Skip to content

Commit

Permalink
Use environment variable to propagate package version info
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Friedman authored and Adam Friedman committed Jan 16, 2024
1 parent 824d5e1 commit 486ed3b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ steps:
displayName: 'Determine build version'
name: GitVersion

- script: |
BUILD_SEMVER="$(GitVersion.FullSemVer)"
echo "##vso[task.setvariable variable=BUILD_SEMVER]$BUILD_SEMVER"
echo "BUILD_SEMVER='$BUILD_SEMVER'"
displayName: Set environment variables from build version

- task: DotNetCoreCLI@2
displayName: 'Restore packages'

Expand Down Expand Up @@ -61,8 +68,11 @@ steps:
inputs:
command: 'pack'
projects: '$(Build.SourcesDirectory)/KubeClient.sln'
arguments: '--configuration "$(buildConfiguration)" /p:VersionPrefix="$(GitVersion.MajorMinorPatch)" /p:VersionSuffix="$(GitVersion.PreReleaseTag)"'

arguments: '--configuration "$(buildConfiguration)"'
outputDir: '$(Build.ArtifactStagingDirectory)/packages'
versioningScheme: byEnvVar
versionEnvVar: BUILD_SEMVER

- task: PublishBuildArtifacts@1
displayName: 'Publish packages as artifact'
Expand Down

0 comments on commit 486ed3b

Please sign in to comment.