Skip to content

Commit

Permalink
Overhaul NuGet versions to include "main" or "develop" (#2636)
Browse files Browse the repository at this point in the history
  • Loading branch information
kythant authored Jun 16, 2022
1 parent bdde939 commit 017dea4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ parameters:
# The "primary" build arch is the one that the nuspec gets its winmd, pri, and other neutral files from
primaryBuildArch: x86
buildFlavor: Release
prereleaseVersionTag: 'prerelease'
condition: ''
buildPool: ''

Expand Down Expand Up @@ -100,7 +99,13 @@ jobs:
inputs:
targetType: 'inline'
script: |
$packageVersion = '$(version).${{ parameters.prereleaseVersionTag }}'
$packageVersion = '$(version)'
$pipelineType = '$(PipelineType)'
$sourceBranchName = '$(Build.SourceBranchName)'
if ($sourceBranchName -eq 'main' -or $sourceBranchName -eq 'develop')
{
$packageVersion = $packageVersion + '.' + $sourceBranchName + '.' + $pipelineType
}
Write-Host "##vso[task.setvariable variable=packageVersion;]$packageVersion"
Write-Host "##vso[task.setvariable variable=packageVersion;isOutput=true;]$packageVersion"
Write-Host $packageVersion
Expand Down
1 change: 0 additions & 1 deletion build/ProjectReunion-BuildFoundation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ jobs:
dependsOn: SignBinariesAndPublishSymbols
signConfigPattern: 'Microsoft.WindowsAppSDK*.nupkg'
useReleaseTag: '$(WindowsAppSDKFinalRelease)'
prereleaseVersionTag: nightly
buildPool: $(ProjectReunionBuildPool)

# Build WinAppSDK and Run Integration Test from TestAll.ps1
Expand Down
4 changes: 2 additions & 2 deletions build/WindowsAppSDK-CommonVariables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ variables:
versionDate: $[format('{0:yyyyMMdd}', pipeline.startTime)]
versionCounter: $[counter(variables['versionDate'], 0)]
version: >
$[format('{0}.{1}.{2}-{3}.{4}.{5}',
variables['major'], variables['minor'], variables['patch'], variables['branch'],
$[format('{0}.{1}.{2}-{3}.{4}',
variables['major'], variables['minor'], variables['patch'],
variables['versionDate'], variables['versionCounter'])]
1 change: 0 additions & 1 deletion build/WindowsAppSDK-Versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ variables:
major: "1"
minor: "1"
patch: "0"
branch: 'main'

0 comments on commit 017dea4

Please sign in to comment.