summaryrefslogtreecommitdiff
path: root/gradle/scripts/git-scm-version.gradle
diff options
context:
space:
mode:
authorjkoan <jkoan@users.noreply.github.com>2021-06-22 09:28:27 +0200
committerGitHub <noreply@github.com>2021-06-22 09:28:27 +0200
commit39b6e79aa9037848da696b12393ecb2e57eaf625 (patch)
treef90d2cdc3f6df8a2e9356d68a1a3ea35e6d06323 /gradle/scripts/git-scm-version.gradle
parent82881fdf0cbb7509401ea626de892b0e18d024eb (diff)
parentea5a86beafcb52f54544e079ef7e4f8ac8b070f4 (diff)
downloadnavit-39b6e79aa9037848da696b12393ecb2e57eaf625.tar.gz
Merge branch 'trunk' into PR_830PR_830
Diffstat (limited to 'gradle/scripts/git-scm-version.gradle')
-rw-r--r--gradle/scripts/git-scm-version.gradle6
1 files changed, 5 insertions, 1 deletions
diff --git a/gradle/scripts/git-scm-version.gradle b/gradle/scripts/git-scm-version.gradle
index 685c95ed8..c6a7cfa09 100644
--- a/gradle/scripts/git-scm-version.gradle
+++ b/gradle/scripts/git-scm-version.gradle
@@ -15,7 +15,11 @@ import java.time.format.DateTimeFormatter
ext {
git = Grgit.open(currentDir: projectDir)
gitVersionName = git.describe(match: ["v[0-9.rc]*"])
- gitVersionCode = Integer.parseInt(DateTimeFormatter.ofPattern("yyMMddHHmm").format(git.head().dateTime))
+ hh = Integer.parseInt(DateTimeFormatter.ofPattern("HH").format(git.head().dateTime))
+ mm = Integer.parseInt(DateTimeFormatter.ofPattern("mm").format(git.head().dateTime))
+ hhmm = Math.round((hh*4)+(mm/15)).toString()
+ yyyyMMdd = DateTimeFormatter.ofPattern("yyyyMMdd").format(git.head().dateTime)
+ gitVersionCode = Integer.parseInt(yyyyMMdd + hhmm)
}
task printVersion() {