Skip to content

Commit c99d8e3

Browse files
committed
Work CI-CD
- Improve update code to get version from github ref. ***NO_CI***
1 parent 475ca13 commit c99d8e3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

azure-pipelines/update-vs-extension.ps1

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,14 @@ $auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.G
4444
$commitMessage = ""
4545
$prTitle = ""
4646
$newBranchName = "develop-nfbot/update-dependencies/" + [guid]::NewGuid().ToString()
47-
$packageTargetVersion = $env:NBGV_NuGetPackageVersion
4847
$packageName = "nanoframework.corelibrary"
4948
$repoMainBranch = "main"
5049

50+
# get the target version from the branch name
51+
$packageTargetVersion = $env:Build_SourceBranch
52+
$packageTargetVersion = $packageTargetVersion -replace "refs/tags/", ""
53+
$packageTargetVersion = $packageTargetVersion.Substring(1)
54+
5155
# working directory is agent temp directory
5256
Write-Debug "Changing working directory to $env:Agent_TempDirectory"
5357
Set-Location "$env:Agent_TempDirectory" | Out-Null

0 commit comments

Comments
 (0)