From 9981912248479a87e682488cc7ea9729790384de Mon Sep 17 00:00:00 2001 From: Skylar Date: Mon, 27 Feb 2023 15:53:18 -0800 Subject: [PATCH 1/4] Fix nbgv versioning --- build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.yml b/build.yml index 50b7b32..bb5a39f 100644 --- a/build.yml +++ b/build.yml @@ -5,6 +5,12 @@ parameters: BuildConfiguration: Release steps: +- powershell: | + dotnet tool install --tool-path "${env:AGENT_TOOLSDIRECTORY}\nbgv" nbgv + $version = & "${env:AGENT_TOOLSDIRECTORY}\nbgv\nbgv.exe" get-version --variable SemVer1 + & "${env:AGENT_TOOLSDIRECTORY}\nbgv\nbgv.exe" cloud --version $version + displayName: 'Set cloud build version' + - task: UseDotNet@2 displayName: 'Install .NET Core SDK' inputs: From fa328f08f5102181171f05b4119e6382d8752504 Mon Sep 17 00:00:00 2001 From: Skylar Date: Mon, 27 Feb 2023 16:11:44 -0800 Subject: [PATCH 2/4] Add BuildConfiguration build variable --- build.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/build.yml b/build.yml index bb5a39f..a807527 100644 --- a/build.yml +++ b/build.yml @@ -5,12 +5,6 @@ parameters: BuildConfiguration: Release steps: -- powershell: | - dotnet tool install --tool-path "${env:AGENT_TOOLSDIRECTORY}\nbgv" nbgv - $version = & "${env:AGENT_TOOLSDIRECTORY}\nbgv\nbgv.exe" get-version --variable SemVer1 - & "${env:AGENT_TOOLSDIRECTORY}\nbgv\nbgv.exe" cloud --version $version - displayName: 'Set cloud build version' - - task: UseDotNet@2 displayName: 'Install .NET Core SDK' inputs: @@ -39,7 +33,7 @@ steps: zipAfterPublish: false - script: | - choco pack pkg\VSConfigFinder\VSConfigFinder.nuspec --out "VSConfigFinder\bin\${{ parameters.BuildConfiguration }}" --version "%NBGV_NuGetPackageVersion%" "Configuration=${{ parameters.BuildConfiguration }}" "CommitId=$(Build.SourceVersion)" "Tag=$(Build.BuildNumber)" + choco pack pkg\VSConfigFinder\VSConfigFinder.nuspec --out "VSConfigFinder\bin\${{ parameters.BuildConfiguration }}" --version "$(Build.GitBuildVersion)" "Configuration=${{ parameters.BuildConfiguration }}" "CommitId=$(Build.SourceVersion)" "Tag=$(Build.BuildNumber)" displayName: Package workingDirectory: $(Build.SourcesDirectory) From 9feea3bdce885347f36e0c037e5ebd98ed405101 Mon Sep 17 00:00:00 2001 From: Skylar Date: Mon, 27 Feb 2023 16:21:34 -0800 Subject: [PATCH 3/4] Fix variable name --- build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.yml b/build.yml index a807527..563c1b2 100644 --- a/build.yml +++ b/build.yml @@ -33,7 +33,7 @@ steps: zipAfterPublish: false - script: | - choco pack pkg\VSConfigFinder\VSConfigFinder.nuspec --out "VSConfigFinder\bin\${{ parameters.BuildConfiguration }}" --version "$(Build.GitBuildVersion)" "Configuration=${{ parameters.BuildConfiguration }}" "CommitId=$(Build.SourceVersion)" "Tag=$(Build.BuildNumber)" + choco pack pkg\VSConfigFinder\VSConfigFinder.nuspec --out "VSConfigFinder\bin\${{ parameters.BuildConfiguration }}" --version "$(GitBuildVersion)" "Configuration=${{ parameters.BuildConfiguration }}" "CommitId=$(Build.SourceVersion)" "Tag=$(Build.BuildNumber)" displayName: Package workingDirectory: $(Build.SourcesDirectory) From 0a916083493569985b7e8144b02b12e5d9032592 Mon Sep 17 00:00:00 2001 From: Skylar Date: Mon, 27 Feb 2023 16:31:24 -0800 Subject: [PATCH 4/4] resolve versioning --- build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.yml b/build.yml index 563c1b2..96c3e00 100644 --- a/build.yml +++ b/build.yml @@ -34,11 +34,11 @@ steps: - script: | choco pack pkg\VSConfigFinder\VSConfigFinder.nuspec --out "VSConfigFinder\bin\${{ parameters.BuildConfiguration }}" --version "$(GitBuildVersion)" "Configuration=${{ parameters.BuildConfiguration }}" "CommitId=$(Build.SourceVersion)" "Tag=$(Build.BuildNumber)" - displayName: Package + displayName: 'Package Nupkg' workingDirectory: $(Build.SourcesDirectory) - task: CopyFiles@2 - displayName: 'Copy build artifacts from: $(Build.SourcesDirectory)\VSConfigFinder\bin\$(BuildConfiguration)\** to $(Build.ArtifactStagingDirectory)\out' + displayName: 'Copy build artifacts' inputs: SourceFolder: $(Build.SourcesDirectory)\VSConfigFinder Contents: | @@ -46,7 +46,7 @@ steps: TargetFolder: $(Build.ArtifactStagingDirectory)\out - task: PublishBuildArtifacts@1 - displayName: 'Publish build artifacts from: $(Build.ArtifactStagingDirectory)\out' + displayName: 'Publish build artifacts' inputs: PathtoPublish: $(Build.ArtifactStagingDirectory)\out ArtifactName: drop