From 630a66bca4dbfe018d2ee8f8bdd9c056ccd16210 Mon Sep 17 00:00:00 2001 From: Lucas Morgan Date: Sun, 26 Jun 2022 17:40:21 +0000 Subject: [PATCH] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 44b2df0..1906d22 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,14 +12,29 @@ pr: pool: vmImage: 'windows-latest' +name: 'This is changed in a task, below' + variables: solution: '**/*.sln' buildPlatform: 'Any CPU' buildConfiguration: 'Release' projectName: 'Gameboard.ShogiUI.Sockets' + version.MajorMinor: '1.0' # Manually change this when needed to follow semver. + version.Patch: $[counter(variables['version.MajorMinor'], 0)] + versionNumber: '$(version.MajorMinor).$(version.Patch)' + steps: +- task: PowerShell@2 + displayName: Set the name of the build (i.e. the Build.BuildNumber) + inputs: + targetType: 'inline' + script: | + [string] $buildName = "$(versionNumber)_$(Build.SourceBranchName)" + Write-Host "Setting the name of the build to '$buildName'." + Write-Host "##vso[build.updatebuildnumber]$buildName" + - task: NuGetToolInstaller@1 - task: NuGetCommand@2 @@ -37,6 +52,7 @@ steps: publishWebProjects: false projects: '**/*.csproj ' zipAfterPublish: false + versioningScheme: byBuildNumber - task: FileTransform@1 inputs: