-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor version handling: introduce VersionProvider for dynamic vers…
…ion information and update command annotations
- Loading branch information
Showing
8 changed files
with
42 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/fr/inria/corese/command/VersionProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package fr.inria.corese.command; | ||
|
||
import fr.inria.corese.core.util.CoreseInfo; | ||
import picocli.CommandLine; | ||
|
||
/** | ||
* Custom version provider for dynamic version information | ||
*/ | ||
public class VersionProvider implements CommandLine.IVersionProvider { | ||
|
||
// Version of Corese-Command | ||
public final static String commandVersion = "4.5.1"; | ||
|
||
@Override | ||
public String[] getVersion() { | ||
return new String[] { | ||
"Corese-Command Version: " + commandVersion, | ||
"Based on Corese-Core Version: " + CoreseInfo.getVersion() | ||
}; | ||
} | ||
|
||
/** | ||
* Get the version of Corese-Command | ||
* | ||
* @return the version of Corese-Command | ||
*/ | ||
public static String getCommandVersion() { | ||
return commandVersion; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters