Skip to content

Commit

Permalink
Tilee/release (#2495)
Browse files Browse the repository at this point in the history
* testing release metadata

* testing powershell

* testing powershell

* testing powershell

* testing powershell

* testing powershell

* testing argument names
  • Loading branch information
TimothyMothra authored Dec 15, 2021
1 parent 44eb2f7 commit 51c3ed8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .pipelines/03_pack.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
cd /D "%~dp0..\"

dotnet pack .\ProjectsForSigning.sln %* --configuration Release --no-restore --no-build || exit /b 1


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%
8 changes: 7 additions & 1 deletion .scripts/release_GenerateReleaseMetadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 51c3ed8

Please sign in to comment.