@@ -65,32 +65,7 @@ steps:
65
65
inputs :
66
66
versionSpec : 5.3.1
67
67
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
94
69
95
70
- powershell : |
96
71
Import-Module $(Build.SourcesDirectory)\build.psm1
@@ -107,7 +82,7 @@ steps:
107
82
$macOSZipPath = Join-Path "$(System.ArtifactsDirectory)/release" 'osx-symbols.zip'
108
83
$psrpZipPath = Join-Path "$(System.ArtifactsDirectory)/release" 'psrp.zip'
109
84
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)
111
86
112
87
displayName : ' Build NuGet package'
113
88
@@ -152,5 +127,5 @@ steps:
152
127
- template : uploadArtifact.yml
153
128
parameters :
154
129
artifactPath : ' $(System.ArtifactsDirectory)\signed'
155
- artifactFilter : ' Microsoft.PowerShell.Native.$(NugetPackageVersion ).nupkg'
130
+ artifactFilter : ' Microsoft.PowerShell.Native.$(PackageVersion ).nupkg'
156
131
artifactName : ' finalResults'
0 commit comments