Fix new template structure (#3004)
This commit is contained in:
Родитель
f151e023b6
Коммит
0ec54c2cdb
|
@ -62,20 +62,15 @@ else {
|
|||
|
||||
### Update template files with date
|
||||
foreach ($file in (Get-ChildItem $releaseFolder/$releaseFileName)) {
|
||||
$fileContent = Get-Content $file
|
||||
$fileContent = Get-Content $file -Raw
|
||||
|
||||
$fileContent = $fileContent | ForEach-Object {
|
||||
if ($_ -match "%%(?<format>.*?)%%") {
|
||||
try {
|
||||
$_ -replace $matches[0], $releaseDate.ToString($matches["format"])
|
||||
}
|
||||
catch {
|
||||
Write-Host ("Date format " + $matches["format"] + " in file $file is invalid.")
|
||||
}
|
||||
} else {
|
||||
$_
|
||||
}
|
||||
$dateFormats = [regex]::Matches($fileContent, "%%(?<format>.*?)%%")
|
||||
|
||||
foreach ($dateFormatMatch in $dateFormats)
|
||||
{
|
||||
$fileContent = $fileContent -replace $dateFormatMatch.Groups[0], $releaseDate.ToString($dateFormatMatch.Groups["format"])
|
||||
}
|
||||
$fileContent | Set-Content $file
|
||||
|
||||
$fileContent | Set-Content $file -NoNewline
|
||||
}
|
||||
}
|
|
@ -5,4 +5,4 @@ tags: dotnet azure
|
|||
sidebar: releases_sidebar
|
||||
repository: azure/azure-sdk-for-net
|
||||
---
|
||||
{% include releases/notes/common.md language="dotnet" data="%%yyyy-MM%%" date="%%MMMM yyyy%%" %}
|
||||
{% include releases/notes/common.md language="dotnet" date="%%yyyy-MM%%" displayDate="%%MMMM yyyy%%" %}
|
||||
|
|
|
@ -5,4 +5,4 @@ tags: java azure
|
|||
sidebar: releases_sidebar
|
||||
repository: azure/azure-sdk-for-java
|
||||
---
|
||||
{% include releases/notes/common.md language="java" data="%%yyyy-MM%%" date="%%MMMM yyyy%%" %}
|
||||
{% include releases/notes/common.md language="java" date="%%yyyy-MM%%" displayDate="%%MMMM yyyy%%" %}
|
||||
|
|
|
@ -5,4 +5,4 @@ tags: javascript typescript azure
|
|||
sidebar: releases_sidebar
|
||||
repository: azure/azure-sdk-for-js
|
||||
---
|
||||
{% include releases/notes/common.md language="js" data="%%yyyy-MM%%" date="%%MMMM yyyy%%" %}
|
||||
{% include releases/notes/common.md language="js" date="%%yyyy-MM%%" displayDate="%%MMMM yyyy%%" %}
|
||||
|
|
|
@ -5,4 +5,4 @@ tags: python azure
|
|||
sidebar: releases_sidebar
|
||||
repository: azure/azure-sdk-for-python
|
||||
---
|
||||
{% include releases/notes/common.md language="python" data="%%yyyy-MM%%" date="%%MMMM yyyy%%" %}
|
||||
{% include releases/notes/common.md language="python" date="%%yyyy-MM%%" displayDate="%%MMMM yyyy%%" %}
|
||||
|
|
|
@ -5,4 +5,4 @@ tags: dotnet azure
|
|||
sidebar: releases_sidebar
|
||||
repository: azure/azure-sdk-for-net
|
||||
---
|
||||
{% include releases/notes/common.md language="dotnet" data="2021-06" date="June 2021" %}
|
||||
{% include releases/notes/common.md language="dotnet" date="2021-06" displayDate="June 2021" %}
|
||||
|
|
|
@ -5,4 +5,4 @@ tags: java azure
|
|||
sidebar: releases_sidebar
|
||||
repository: azure/azure-sdk-for-java
|
||||
---
|
||||
{% include releases/notes/common.md language="java" data="2021-06" date="%%MMMM yyyy%%" %}
|
||||
{% include releases/notes/common.md language="java" date="2021-06" displayDate="June 2021" %}
|
||||
|
|
|
@ -5,4 +5,4 @@ tags: javascript typescript azure
|
|||
sidebar: releases_sidebar
|
||||
repository: azure/azure-sdk-for-js
|
||||
---
|
||||
{% include releases/notes/common.md language="js" data="2021-06" date="%%MMMM yyyy%%" %}
|
||||
{% include releases/notes/common.md language="js" date="2021-06" displayDate="June 2021" %}
|
||||
|
|
|
@ -5,4 +5,4 @@ tags: python azure
|
|||
sidebar: releases_sidebar
|
||||
repository: azure/azure-sdk-for-python
|
||||
---
|
||||
{% include releases/notes/common.md language="python" data="2021-06" date="%%MMMM yyyy%%" %}
|
||||
{% include releases/notes/common.md language="python" date="2021-06" displayDate="June 2021" %}
|
||||
|
|
Загрузка…
Ссылка в новой задаче