mirror of
https://github.com/JHUAPL/Jackfruit.git
synced 2026-01-08 21:58:09 -05:00
Resolve "add version to generated annotation"
This commit is contained in:
@@ -189,6 +189,6 @@ If you'd like to create a configuration object that differs from the template po
|
||||
config = factory.withIntMethod(config, 4);
|
||||
```
|
||||
|
||||
This replaces the "doubles" and the "key" properties. The "with" methods are just wrappers around the "setProperty" method of the PropertiesConfiguration class.
|
||||
This replaces the "doubles" and the "key" properties. The "with" methods are just wrappers around the "setProperty" method of the PropertiesConfiguration class. You can now use `fromConfig()` to create a new DemoInterface object with the updated values.
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
rev=$(git rev-parse --verify --short HEAD)
|
||||
rev=$(git rev-parse --verify --short=8 HEAD)
|
||||
if [ $? -gt 0 ]; then
|
||||
rev="UNKNOWN"
|
||||
fi
|
||||
@@ -14,7 +14,9 @@ if [ $? -gt 0 ]; then
|
||||
branch="UNKNOWN"
|
||||
fi
|
||||
|
||||
package=Jackfruit
|
||||
date=$(date -u +"%y.%m.%d")
|
||||
|
||||
package=jackfruit
|
||||
srcFile="../java/jackfruit/JackfruitVersion.java"
|
||||
mkdir -p $(dirname $srcFile)
|
||||
|
||||
@@ -27,6 +29,7 @@ package jackfruit;
|
||||
public class JackfruitVersion {
|
||||
public final static String rev = new String("$rev");
|
||||
public final static String packageName = new String("$package");
|
||||
public final static String dateString = new String("$date");
|
||||
public final static String branch = new String("$branch");
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
package jackfruit;
|
||||
|
||||
public class JackfruitVersion {
|
||||
public final static String rev = new String("168ca45");
|
||||
public final static String packageName = new String("Jackfruit");
|
||||
public final static String branch = new String("11-add-createconfig");
|
||||
public final static String rev = new String("9ad69b62");
|
||||
public final static String packageName = new String("jackfruit");
|
||||
public final static String dateString = new String("22.11.27");
|
||||
public final static String branch = new String("UNKNOWN");
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ public class ConfigProcessor extends AbstractProcessor {
|
||||
AnnotationSpec generated = AnnotationSpec.builder(Generated.class)
|
||||
.addMember("value", String.format("\"%s\"", JackfruitVersion.packageName))
|
||||
.addMember("date", String.format("\"%s\"", formatter.format(now)))
|
||||
.addMember("comments", String.format("\"branch %s (%s)\"", JackfruitVersion.branch,
|
||||
.addMember("comments", String.format("\"version %s-%s\"", JackfruitVersion.dateString,
|
||||
JackfruitVersion.rev))
|
||||
.build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user