build: use commits count in gitlab ci version

This commit is contained in:
Skylot
2018-01-06 10:47:27 +03:00
parent ca9dc5f944
commit 9278c51035
+1 -1
View File
@@ -13,7 +13,7 @@ stages:
build:
stage: build
script:
- sed -i " 1 s/.*/&-b${CI_JOB_ID}/" version
- sed -i " 1 s/.*/&-b$(git rev-list --count HEAD)-$(git rev-parse --short HEAD)/" version
- cat version
- ./gradlew -g /cache/.gradle clean build jacocoTestReport
- ./gradlew -g /cache/.gradle clean sonarqube -Dsonar.host.url=$SONAR_HOST -Dsonar.organization=$SONAR_ORG -Dsonar.login=$SONAR_TOKEN