From 6d11332711b234e1ba0de0b5eb7e90dc842c19db Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Tue, 14 Dec 2021 14:44:08 -0800 Subject: [PATCH 1/7] testing release metadata --- .pipelines/03_pack.cmd | 4 +++- .scripts/release_GenerateReleaseMetadata.ps1 | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.pipelines/03_pack.cmd b/.pipelines/03_pack.cmd index f26eeadcf0..43f2a0ac3b 100644 --- a/.pipelines/03_pack.cmd +++ b/.pipelines/03_pack.cmd @@ -1,3 +1,5 @@ cd /D "%~dp0..\" -dotnet pack .\ProjectsForSigning.sln %* --configuration Release --no-restore --no-build || exit /b 1 +dotnet pack .\ProjectsForSigning.sln %* --configuration Release --no-restore --no-build + +.\.scripts\release_GenerateReleaseMetadata.ps1 -artifactsPath .\bin\Release\NuGet -sourcePath .\ -outPath .\bin\Release\NuGet \ No newline at end of file diff --git a/.scripts/release_GenerateReleaseMetadata.ps1 b/.scripts/release_GenerateReleaseMetadata.ps1 index 770e209328..c3f53cf4dc 100644 --- a/.scripts/release_GenerateReleaseMetadata.ps1 +++ b/.scripts/release_GenerateReleaseMetadata.ps1 @@ -5,7 +5,7 @@ Param( [Parameter(Mandatory=$true,HelpMessage="Path to Source files (changelog):")] [string] $sourcePath, - [Parameter(Mandatory=$false,HelpMessage="Path to save metadata:")] + [Parameter(Mandatory=$true,HelpMessage="Path to save metadata:")] [string] $outPath ) @@ -160,6 +160,12 @@ Function Get-ChangelogText ([string]$sourcePath, [string]$versionName) { } Function Save-ToXml([string]$outPath, [ReleaseInfo]$object) { + + if ( -not (Test-Path -Path $outPath -PathType Container) ) + { + throw "Output directory does not exist: '$($outPath)'." + } + $outFilePath = Join-Path $outPath "releaseMetaData.xml" $xmlWriter = [System.XMl.XmlTextWriter]::new($outFilePath, $Null) $xmlWriter.Formatting = "Indented" From 063af8da5361bce2c602eafadd4fa5ca07275b75 Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Tue, 14 Dec 2021 17:07:00 -0800 Subject: [PATCH 2/7] testing powershell --- .pipelines/03_pack.cmd | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.pipelines/03_pack.cmd b/.pipelines/03_pack.cmd index 43f2a0ac3b..dfe57c4485 100644 --- a/.pipelines/03_pack.cmd +++ b/.pipelines/03_pack.cmd @@ -1,5 +1,9 @@ cd /D "%~dp0..\" -dotnet pack .\ProjectsForSigning.sln %* --configuration Release --no-restore --no-build +dotnet pack .\ProjectsForSigning.sln %* --configuration Release --no-restore --no-build || exit /b 1 -.\.scripts\release_GenerateReleaseMetadata.ps1 -artifactsPath .\bin\Release\NuGet -sourcePath .\ -outPath .\bin\Release\NuGet \ No newline at end of file + +setlocal enabledelayedexpansion +powershell.exe -ExecutionPolicy Unrestricted -NoProfile -WindowStyle Hidden -File ".\.scripts\release_GenerateReleaseMetadata.ps1 -artifactsPath .\bin\Release\NuGet -sourcePath .\ -outPath .\bin\Release\NuGet" +endlocal +exit /B %ERRORLEVEL% From 72b84cc13db658e5c2de7687402aaf9ee23d0a59 Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Tue, 14 Dec 2021 17:48:09 -0800 Subject: [PATCH 3/7] testing powershell --- .pipelines/03_pack.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/03_pack.cmd b/.pipelines/03_pack.cmd index dfe57c4485..8d7ab2616b 100644 --- a/.pipelines/03_pack.cmd +++ b/.pipelines/03_pack.cmd @@ -4,6 +4,6 @@ dotnet pack .\ProjectsForSigning.sln %* --configuration Release --no-restore --n setlocal enabledelayedexpansion -powershell.exe -ExecutionPolicy Unrestricted -NoProfile -WindowStyle Hidden -File ".\.scripts\release_GenerateReleaseMetadata.ps1 -artifactsPath .\bin\Release\NuGet -sourcePath .\ -outPath .\bin\Release\NuGet" +powershell.exe -ExecutionPolicy Unrestricted -NoProfile -WindowStyle Hidden -File ".\.scripts\release_GenerateReleaseMetadata.ps1" "-artifactsPath .\bin\Release\NuGet -sourcePath .\ -outPath .\bin\Release\NuGet" endlocal exit /B %ERRORLEVEL% From 12b700c04587c4ca35b5d36d8504150ed7e4c019 Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Wed, 15 Dec 2021 10:21:12 -0800 Subject: [PATCH 4/7] testing powershell --- .pipelines/03_pack.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/03_pack.cmd b/.pipelines/03_pack.cmd index 8d7ab2616b..5a523e74f2 100644 --- a/.pipelines/03_pack.cmd +++ b/.pipelines/03_pack.cmd @@ -4,6 +4,6 @@ dotnet pack .\ProjectsForSigning.sln %* --configuration Release --no-restore --n setlocal enabledelayedexpansion -powershell.exe -ExecutionPolicy Unrestricted -NoProfile -WindowStyle Hidden -File ".\.scripts\release_GenerateReleaseMetadata.ps1" "-artifactsPath .\bin\Release\NuGet -sourcePath .\ -outPath .\bin\Release\NuGet" +powershell.exe -ExecutionPolicy Unrestricted -NoProfile -WindowStyle Hidden -File ".\.scripts\release_GenerateReleaseMetadata.ps1" -artifactsPath ".\bin\Release\NuGet" -sourcePath ".\" -outPath ".\bin\Release\NuGet" endlocal exit /B %ERRORLEVEL% From ebb79ebb42d52df57c7238465904e5a783501617 Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Wed, 15 Dec 2021 10:42:53 -0800 Subject: [PATCH 5/7] testing powershell --- .pipelines/03_pack.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/03_pack.cmd b/.pipelines/03_pack.cmd index 5a523e74f2..503cbd3ca0 100644 --- a/.pipelines/03_pack.cmd +++ b/.pipelines/03_pack.cmd @@ -4,6 +4,6 @@ dotnet pack .\ProjectsForSigning.sln %* --configuration Release --no-restore --n setlocal enabledelayedexpansion -powershell.exe -ExecutionPolicy Unrestricted -NoProfile -WindowStyle Hidden -File ".\.scripts\release_GenerateReleaseMetadata.ps1" -artifactsPath ".\bin\Release\NuGet" -sourcePath ".\" -outPath ".\bin\Release\NuGet" +powershell.exe -ExecutionPolicy Unrestricted -NoProfile -WindowStyle Hidden -File ".\.scripts\release_GenerateReleaseMetadata.ps1" ".\bin\Release\NuGet" ".\" ".\bin\Release\NuGet" endlocal exit /B %ERRORLEVEL% From 620a58f908759f9155076212f65f2798538e3e04 Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Wed, 15 Dec 2021 11:07:47 -0800 Subject: [PATCH 6/7] testing powershell --- .pipelines/03_pack.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/03_pack.cmd b/.pipelines/03_pack.cmd index 503cbd3ca0..03a8e9cb7a 100644 --- a/.pipelines/03_pack.cmd +++ b/.pipelines/03_pack.cmd @@ -4,6 +4,6 @@ dotnet pack .\ProjectsForSigning.sln %* --configuration Release --no-restore --n setlocal enabledelayedexpansion -powershell.exe -ExecutionPolicy Unrestricted -NoProfile -WindowStyle Hidden -File ".\.scripts\release_GenerateReleaseMetadata.ps1" ".\bin\Release\NuGet" ".\" ".\bin\Release\NuGet" +powershell.exe -ExecutionPolicy Unrestricted -NoProfile -WindowStyle Hidden -File "./.scripts/release_GenerateReleaseMetadata.ps1" "./bin/Release/NuGet" "./" "./bin/Release/NuGet" endlocal exit /B %ERRORLEVEL% From 75f68799e470e0ca8e88bf558d453cec1153e6dd Mon Sep 17 00:00:00 2001 From: TimothyMothra Date: Wed, 15 Dec 2021 11:37:42 -0800 Subject: [PATCH 7/7] testing argument names --- .pipelines/03_pack.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipelines/03_pack.cmd b/.pipelines/03_pack.cmd index 03a8e9cb7a..ef4f5bda62 100644 --- a/.pipelines/03_pack.cmd +++ b/.pipelines/03_pack.cmd @@ -4,6 +4,6 @@ dotnet pack .\ProjectsForSigning.sln %* --configuration Release --no-restore --n setlocal enabledelayedexpansion -powershell.exe -ExecutionPolicy Unrestricted -NoProfile -WindowStyle Hidden -File "./.scripts/release_GenerateReleaseMetadata.ps1" "./bin/Release/NuGet" "./" "./bin/Release/NuGet" +powershell.exe -ExecutionPolicy Unrestricted -NoProfile -WindowStyle Hidden -File "./.scripts/release_GenerateReleaseMetadata.ps1" -artifactsPath "./bin/Release/NuGet" -sourcePath "./" -outPath "./bin/Release/NuGet" endlocal exit /B %ERRORLEVEL%