@@ -65,32 +65,7 @@ steps:
6565 inputs :
6666 versionSpec : 5.3.1
6767
68- - powershell : |
69- $Branch = $env:BUILD_SOURCEBRANCH
70- $branchOnly = $Branch -replace '^refs/heads/';
71- $branchOnly = $branchOnly -replace '[_\-]'
72-
73- $packageVersion = if($env:PACKAGE_VERSION -eq 'fromBranch' -or !$env:PACKAGE_VERSION)
74- {
75- if($Branch -match '^.*(release[-/])')
76- {
77- Write-verbose "release branch:" -verbose
78- $Branch -replace '^.*(release[-/]v)'
79- }
80- else
81- {
82- "0.0.0"
83- }
84- }
85- else {
86- "0.0.0"
87- }
88-
89- $vstsCommandString = "vso[task.setvariable variable=NugetPackageVersion]$packageVersion"
90- Write-Verbose -Message "setting $Variable to $packageVersion" -Verbose
91- Write-Host -Object "##$vstsCommandString"
92-
93- displayName : Set NuGetPackageVersion
68+ - template : setVersion.yml
9469
9570- powershell : |
9671 Import-Module $(Build.SourcesDirectory)\build.psm1
@@ -107,7 +82,7 @@ steps:
10782 $macOSZipPath = Join-Path "$(System.ArtifactsDirectory)/release" 'osx-symbols.zip'
10883 $psrpZipPath = Join-Path "$(System.ArtifactsDirectory)/release" 'psrp.zip'
10984
110- Start-BuildPowerShellNativePackage -PackageRoot $PackageRoot -Version $(NugetPackageVersion ) -WindowsX64ZipPath $WindowsX64ZipPath -WindowsX86ZipPath $WindowsX86ZipPath -WindowsARMZipPath $WindowsARMZipPath -WindowsARM64ZipPath $WindowsARM64ZipPath -LinuxZipPath $LinuxZipPath -LinuxARMZipPath $LinuxARMZipPath -LinuxARM64ZipPath $LinuxARM64ZipPath -LinuxAlpineZipPath $LinuxAlpineZipPath -macOSZipPath $macOSZipPath -psrpZipPath $psrpZipPath -NuGetOutputPath $(NuGetPackagePath)
85+ Start-BuildPowerShellNativePackage -PackageRoot $PackageRoot -Version $(PackageVersion ) -WindowsX64ZipPath $WindowsX64ZipPath -WindowsX86ZipPath $WindowsX86ZipPath -WindowsARMZipPath $WindowsARMZipPath -WindowsARM64ZipPath $WindowsARM64ZipPath -LinuxZipPath $LinuxZipPath -LinuxARMZipPath $LinuxARMZipPath -LinuxARM64ZipPath $LinuxARM64ZipPath -LinuxAlpineZipPath $LinuxAlpineZipPath -macOSZipPath $macOSZipPath -psrpZipPath $psrpZipPath -NuGetOutputPath $(NuGetPackagePath)
11186
11287 displayName : ' Build NuGet package'
11388
@@ -152,5 +127,5 @@ steps:
152127- template : uploadArtifact.yml
153128 parameters :
154129 artifactPath : ' $(System.ArtifactsDirectory)\signed'
155- artifactFilter : ' Microsoft.PowerShell.Native.$(NugetPackageVersion ).nupkg'
130+ artifactFilter : ' Microsoft.PowerShell.Native.$(PackageVersion ).nupkg'
156131 artifactName : ' finalResults'
0 commit comments