mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 20:15:09 +00:00
bugfixed ‘print build time as part of version number if edge release’ feature.
This commit is contained in:
1 parent
f8b3056dc4
commit
b37a95a6a4
2 files changed
+3
-3
No files matched your search
@@ -208,7 +208,7 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
|
||||
<tstamp>
|
||||
<format property="releaseTimestamp" pattern="yyyy-MM-dd" />
|
||||
</tstamp>
|
||||
<echo file="release-timestamp.txt">$releaseTimestamp</echo>
|
||||
<echo file="release-timestamp.txt">${releaseTimestamp}</echo>
|
||||
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/build/com.googlecode.jarjar-jarjar.jar" />
|
||||
<jarjar destfile="dist/lombok-${lombok.version}.jar">
|
||||
<fileset dir="build/lombok">
|
||||
|
||||
@@ -71,7 +71,7 @@ public class Version {
|
||||
String version = String.format("v%s \"%s\"", VERSION, RELEASE_NAME);
|
||||
if (!isEdgeRelease()) return version;
|
||||
|
||||
InputStream in = Version.class.getResourceAsStream("release-timestamp.txt");
|
||||
InputStream in = Version.class.getResourceAsStream("/release-timestamp.txt");
|
||||
if (in == null) return version;
|
||||
try {
|
||||
byte[] data = new byte[65536];
|
||||
@@ -97,7 +97,7 @@ public class Version {
|
||||
int lastIdx = VERSION.lastIndexOf('.');
|
||||
if (lastIdx == -1) return false;
|
||||
try {
|
||||
return Integer.parseInt(VERSION.substring(lastIdx + 1)) % 1 == 1;
|
||||
return Integer.parseInt(VERSION.substring(lastIdx + 1)) % 2 == 1;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user