# HG changeset patch # User Laurens Holst # Date 1644719622 -3600 # Sun Feb 13 03:33:42 2022 +0100 # Node ID 9365e9ac1134ab6969526901ad87f61fb2af6dd2 # Parent 1dcce6cbc0c695cf8160166e48c446931abeac6e Assembler: Show version information when run without arguments. diff --git a/CHANGES.md b/CHANGES.md --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,7 @@ * The `"` character can now be written as `""` in string literals. * Documented the `end` directive, supported since the initial release. * The source file encoding is changed from ISO-8859-1 to UTF-8. + * Glass now shows version information when run without arguments. Glass 0.5 — 2017-01-18 ---------------------- diff --git a/pom.xml b/pom.xml --- a/pom.xml +++ b/pom.xml @@ -60,6 +60,22 @@ + org.codehaus.mojo + buildnumber-maven-plugin + 3.0.0 + + + validate + + create + + + + + ${maven.build.timestamp} + + + org.apache.maven.plugins maven-jar-plugin 3.2.2 @@ -67,7 +83,11 @@ ${mainClass} + true + + ${project.version} (${buildNumber}) + diff --git a/src/main/java/nl/grauw/glass/Assembler.java b/src/main/java/nl/grauw/glass/Assembler.java --- a/src/main/java/nl/grauw/glass/Assembler.java +++ b/src/main/java/nl/grauw/glass/Assembler.java @@ -20,6 +20,12 @@ */ public static void main(String[] args) { if (args.length == 0) { + System.out.println(String.format("%s %s by %s", + Assembler.class.getPackage().getImplementationTitle(), + Assembler.class.getPackage().getImplementationVersion(), + Assembler.class.getPackage().getImplementationVendor() + )); + System.out.println(); System.out.println("Usage: java -jar glass.jar [OPTION] SOURCE [OBJECT] [SYMBOL]"); System.exit(1); }