mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Merge branch 'svn-to-git' into 'master'
make development version reference GIT not SVN See merge request core-developers/forge!198
This commit is contained in:
@@ -30,19 +30,19 @@ public class BuildInfo {
|
|||||||
/**
|
/**
|
||||||
* Get the current version of Forge.
|
* Get the current version of Forge.
|
||||||
*
|
*
|
||||||
* @return a String representing the version specifier, or "SVN" if unknown.
|
* @return a String representing the version specifier, or "GIT" if unknown.
|
||||||
*/
|
*/
|
||||||
public static final String getVersionString() {
|
public static final String getVersionString() {
|
||||||
String version = BuildInfo.class.getPackage().getImplementationVersion();
|
String version = BuildInfo.class.getPackage().getImplementationVersion();
|
||||||
if (StringUtils.isEmpty(version)) {
|
if (StringUtils.isEmpty(version)) {
|
||||||
return "SVN";
|
return "GIT";
|
||||||
}
|
}
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isDevelopmentVersion() {
|
public static boolean isDevelopmentVersion() {
|
||||||
String forgeVersion = getVersionString();
|
String forgeVersion = getVersionString();
|
||||||
return StringUtils.containsIgnoreCase(forgeVersion, "svn") ||
|
return StringUtils.containsIgnoreCase(forgeVersion, "git") ||
|
||||||
StringUtils.containsIgnoreCase(forgeVersion, "snapshot");
|
StringUtils.containsIgnoreCase(forgeVersion, "snapshot");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class GuiDesktop implements IGuiBase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getAssetsDir() {
|
public String getAssetsDir() {
|
||||||
return StringUtils.containsIgnoreCase(BuildInfo.getVersionString(), "svn") ?
|
return StringUtils.containsIgnoreCase(BuildInfo.getVersionString(), "git") ?
|
||||||
"../forge-gui/" : "";
|
"../forge-gui/" : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public class FModelTest {
|
|||||||
public final void test_getVersion() throws FileNotFoundException {
|
public final void test_getVersion() throws FileNotFoundException {
|
||||||
final String version = BuildInfo.getVersionString();
|
final String version = BuildInfo.getVersionString();
|
||||||
|
|
||||||
Assert.assertEquals(version, "SVN", "version is default");
|
Assert.assertEquals(version, "GIT", "version is default");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user