public class ALDVersionProviderGit extends ALDVersionProvider
Note that the environment variable GIT_DIR has to be set to the Git repository location, i.e. the .git repository which should be accessed. Please set the variable exactly to the .git directory and not just to the parent directory of the .git directory.
Modifier and Type | Field and Description |
---|---|
private static String |
localVersion
Version info string.
|
private static String |
revFile
Name of revision file.
|
Constructor and Description |
---|
ALDVersionProviderGit() |
Modifier and Type | Method and Description |
---|---|
private static String |
getRepositoryInfo()
Returns information about current commit.
|
String |
getVersion()
Returns the software version of currently running instance.
|
private static String localVersion
private static final String revFile
public String getVersion()
ALDVersionProvider
getVersion
in class ALDVersionProvider
private static String getRepositoryInfo()
If no git repository is found, the method checks for a file "revision.txt" as it is present in Alida jar files. If the file does not exist or is empty, a dummy string is returned.
Copyright © 2010–2021 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.