Skip to content

Commit 358592b

Browse files
committed
Release v1.1.0
GRIP Versions will now be pulled from git instead of manually entered
1 parent 73e5131 commit 358592b

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

build.gradle

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ plugins {
1515
}
1616
apply plugin: 'nebula-aggregate-javadocs'
1717

18+
19+
/*
20+
* Gets the version name from the latest Git tag
21+
* http://ryanharter.com/blog/2013/07/30/automatic-versioning-with-git-and-gradle/
22+
*/
23+
def getVersionName = { ->
24+
def stdout = new ByteArrayOutputStream()
25+
exec {
26+
commandLine 'git', 'describe', '--tags'
27+
standardOutput = stdout
28+
}
29+
return stdout.toString().trim()
30+
}
31+
1832
allprojects {
1933
apply plugin: 'java'
2034
apply plugin: 'application'
@@ -36,7 +50,7 @@ allprojects {
3650
testCompile group: 'junit', name: 'junit', version: '4.12'
3751
}
3852

39-
version = '1.0.0'
53+
version = getVersionName()
4054

4155
compileJava {
4256
options.compilerArgs << "-g"

core/src/main/java/edu/wpi/grip/core/GRIPCoreModule.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public synchronized void publish(final LogRecord record) {
6868
fileHandler.setFormatter(new SimpleFormatter());//log in text, not xml
6969

7070
globalLogger.config("Configuration done.");//Log that we are done setting up the logger
71+
globalLogger.config("GRIP Version: " + edu.wpi.grip.core.Main.class.getPackage().getImplementationVersion());
7172

7273
} catch (IOException exception) {//Something happened setting up file IO
7374
throw new IllegalStateException("Failed to configure the Logger", exception);

0 commit comments

Comments
 (0)