Skip to content

Commit 2a1cdbf

Browse files
Fix build version script
1 parent 6451c55 commit 2a1cdbf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

azure-pipelines.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ stages:
4646

4747
- script: |
4848
echo "Setting BUILD_VERSION..."
49-
BUILD_VERSION=$(date +'%Y%m%d')-$(Build.SourceVersionShort)
50-
echo "##vso[task.setvariable variable=BUILD_VERSION;isOutput=true]$BUILD_VERSION"
51-
echo "::add-mask::$BUILD_VERSION"
52-
name: SetVersion
53-
displayName: "Set Secret Build Version"
49+
set BUILD_VERSION=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%-%BUILD_SOURCEVERSION:~0,7%
50+
echo BUILD_VERSION=%BUILD_VERSION%
51+
echo "##vso[task.setvariable variable=BUILD_VERSION;isOutput=true]%BUILD_VERSION%"
52+
echo "::add-mask::%BUILD_VERSION%"
53+
displayName: "Set Secret Build Version"
5454
5555
- task: Docker@2
5656
displayName: Build Docker Image

0 commit comments

Comments
 (0)