Skip to content

Commit a6bf3de

Browse files
author
jusjoken
committed
Updates to build.gradle to run under ubuntu 22.04
1 parent 15145ee commit a6bf3de

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

build.gradle

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import org.gradle.internal.os.OperatingSystem
22

33
plugins {
44
id "com.github.breadmoirai.github-release" version "2.2.12"
5+
//id "me.qoomon.git-versioning" version "6.4.4"
6+
//id "org.meiskalt7.gradle.version" version "0.6.0"
57
}
68

79
apply plugin: "java"
@@ -45,10 +47,22 @@ ext {
4547
releaseVersion = releaseVersion.replaceAll("[\\.\\(\\)]", "").replaceAll("[\\s]", "-").toLowerCase()
4648
}
4749

50+
System.out.println("START Version ${version}");
51+
52+
//System.out.println("TEST Version ${gitVersion.buildNumber}");
53+
4854
version = fullVersion
55+
/*
56+
gitVersioning.apply {
57+
// see configuration documentation below
58+
rev {
59+
version = "\${describe.distance}"
60+
}
61+
}
62+
*/
4963

5064
// Just printing out the SAGETV build version for informational purposes
51-
// System.out.println("SAGETV VERSION ${versionArch}");
65+
System.out.println("SAGETV VERSION ${versionArch}");
5266

5367
// set gradle's buildDir to something other than the default 'build', or
5468
// we'll end up deleting EVERYTHING in 'build' when we ./gradlew clean
@@ -332,6 +346,14 @@ def getBuildNumber() {
332346
333347
buildVer = ant.sagebuildnum
334348
*/
349+
new ByteArrayOutputStream().withStream { outputStream ->
350+
exec {
351+
executable 'git'
352+
args 'rev-list', 'HEAD', '--count'
353+
standardOutput = outputStream
354+
}
355+
buildVer = outputStream.toString().trim()
356+
}
335357
} else if (OperatingSystem.current().isWindows()) {
336358
//ensure full path to git\bin is in the Path Environment variable on windows
337359
// 04-24-2017 JS: I changed this to remove the dependency on sh. Also we should note that

0 commit comments

Comments
 (0)