diff options
Diffstat (limited to '01-don-t-try-to-guess-git-version_v6.6.patch')
-rw-r--r-- | 01-don-t-try-to-guess-git-version_v6.6.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/01-don-t-try-to-guess-git-version_v6.6.patch b/01-don-t-try-to-guess-git-version_v6.6.patch new file mode 100644 index 000000000000..792b9a31acfc --- /dev/null +++ b/01-don-t-try-to-guess-git-version_v6.6.patch @@ -0,0 +1,35 @@ +diff --unified --recursive --text a/build.gradle b/build.gradle +--- a/build.gradle 2021-10-14 15:56:23.135659680 +0000 ++++ b/build.gradle 2021-10-14 16:06:01.380243952 +0000 +@@ -2,12 +2,11 @@ + id 'java' + id 'com.github.johnrengelman.shadow' version '6.0.0' + id 'maven-publish' +- id 'com.palantir.git-version' version '0.12.3' + } + + group = 'com.conveyal' + // set version to `git describe --tags --always --first-parent`, plus '.dirty' if local changes are present. +-version gitVersion() ++version 'v6.6' + + java { + sourceCompatibility = JavaVersion.VERSION_11 +@@ -99,14 +98,13 @@ + // such as the full commit ID and branch name, rather than just the version available in the JAR manifest. + task createVersionProperties(dependsOn: processResources) { + doLast { +- def details = versionDetails() + def dir = new File(buildDir, "resources/main/com/conveyal/r5/") + mkdir(dir) + new File(dir, "version.properties").withWriter { w -> + Properties p = new Properties() +- p['version'] = project.version.toString() +- p['commit'] = details.gitHashFull +- p['branch'] = details.branchName ?: "NONE" // avoid NPE when building pushed tag ++ p['version'] = version ++ p['commit'] = "" ++ p['branch'] = "" + p.store w, null + } + // Also make a simple one-line version.txt for scripts to use |