Include git commit id in released versions

This commit is contained in:
Antonin Delpeuch 2018-11-22 20:08:31 +00:00
parent 8a72d359e0
commit ed6900f180
2 changed files with 7 additions and 2 deletions

View File

@ -112,9 +112,9 @@ public class RefineServlet extends Butterfly {
}
if (REVISION.equals("$REVISION")) {
ClassLoader classLoader = getClass().getClassLoader();
try {
InputStream gitStats = classLoader.getResourceAsStream("git.properties");
ObjectMapper mapper = new ObjectMapper();
try {
ObjectNode parsedGit = mapper.readValue(gitStats, ObjectNode.class);
REVISION = parsedGit.get("git.commit.id.abbrev").asText("TRUNK");
} catch (IOException e) {

View File

@ -46,6 +46,11 @@
<exclude name="WEB-INF/lib/icu4j*.jar"/>
</fileset>
</copy>
<copy todir="${built.webapp.dir}">
<fileset dir="${webapp.dir}">
<include name="**/*.properties"/>
</fileset>
</copy>
<copy todir="${built.webapp.dir}/WEB-INF/lib/">
<fileset dir="${webapp.target}">
<include name="openrefine-main.jar" />