This repository was archived by the owner on Jan 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -20,20 +20,24 @@ schedules:
2020
2121jobs :
2222 - job : CLI
23-
23+
2424 steps :
2525 - bash : |
2626 short_hash=`git rev-parse --short=7 HEAD` ## At least 7 digits, more if needed for uniqueness
2727 echo "Full git hash: $(Build.SourceVersion)"
2828 echo "Short git hash: $short_hash"
29- echo "##vso[task.setvariable variable=buildVersion ]$short_hash" ## Store variable for subsequent steps
29+ echo "##vso[task.setvariable variable=short_hash ]$short_hash" ## Store variable for subsequent steps
3030 workingDirectory: $(Build.SourcesDirectory)
3131 displayName: Set Build Version
3232
33+ - powershell : |
34+ $date = (Get-Date).ToString("yyyyMMdd")
35+ echo "##vso[task.setvariable variable=buildDate]$date" ## Store variable for subsequent steps
36+
3337 - task : colinsalmcorner.colinsalmcorner-buildtasks.tag-build-task.tagBuildOrRelease@0
3438 displayName : ' Tag Build with version number'
3539 inputs :
36- tags : ' Version=4.10.0-dev.$(buildVersion )'
40+ tags : ' Version=4.10.0-dev.$(buildDate).$(short_hash )'
3741 continueOnError : true
3842
3943 - task : NodeTool@0
5761 - script : ' rush test'
5862 displayName : ' rush test'
5963
60- - script : ' node ./common/scripts/version-and-pack.js --version 4.10.0-dev.$(buildVersion )'
64+ - script : ' node ./common/scripts/version-and-pack.js --version 4.10.0-dev.$(buildDate).$(short_hash )'
6165 displayName : ' Version and Pack'
6266
6367 - task : CopyFiles@2
You can’t perform that action at this time.
0 commit comments