Commit 9278c510 authored by Skylot's avatar Skylot

build: use commits count in gitlab ci version

parent ca9dc5f9
...@@ -13,7 +13,7 @@ stages: ...@@ -13,7 +13,7 @@ stages:
build: build:
stage: build stage: build
script: 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 - cat version
- ./gradlew -g /cache/.gradle clean build jacocoTestReport - ./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 - ./gradlew -g /cache/.gradle clean sonarqube -Dsonar.host.url=$SONAR_HOST -Dsonar.organization=$SONAR_ORG -Dsonar.login=$SONAR_TOKEN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment