Skip to content

Commit 3e35453

Browse files
committed
Script change for NuGet version numbers.
1 parent 54dbf5c commit 3e35453

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Build/scripts/init_build.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@ $PushDate = Get-Date $BuildPushDate -Format yyMMdd.HHmm
9999

100100
$buildPushId, $buildPushIdPart1, $buildPushIdPart2, $buildPushIdString = GetBuildPushId $info
101101

102-
$VersionString = "${Env:VERSION_MAJOR}.${Env:VERSION_MINOR}.${buildPushIdString}"
102+
$VersionMajor = UseValueOrDefault "$Env:VERSION_MAJOR" "1"
103+
$VersionMinor = UseValueOrDefault "$Env:VERSION_MINOR" "2"
104+
$VersionPatch = UseValueOrDefault "$Env:VERSION_PATCH" "0"
105+
$VersionQFE = UseValueOrDefault "$Env:VERSION_QFE" "0"
106+
107+
$VersionString = "${VersionMajor}.${VersionMinor}.${VersionPatch}.${VersionQFE}"
103108
$PreviewVersionString = "${VersionString}-preview"
104109

105110
# unless it is a build branch, subdivide the output directory by month

Build/scripts/pre_post_util.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ function WriteCommonArguments() {
1313
}
1414

1515
function GetBuildInfo($oauth, $commitHash) {
16-
# Get the git remote path and construct the rest API URI
16+
# Get the git remote path and construct the REST API URI
1717
$gitExe = GetGitPath
18-
$remote = (iex "$gitExe remote -v")[0].split()[1].replace("_git", "_apis/git/repositories")
18+
$remote = (iex "$gitExe remote -v" | ? { $_.contains("_git") })[0].split()[1].replace("_git", "_apis/git/repositories")
1919
$remote = $remote.replace("mshttps", "https")
2020

2121
# Get the pushId and push date time to use that for build number and build date time

0 commit comments

Comments
 (0)