mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Add HISTORY field. Make isNewVersion public
This commit is contained in:
parent
3fb73ac0a3
commit
3df2f7e177
1 changed files with 9 additions and 1 deletions
|
@ -17,6 +17,9 @@
|
||||||
|
|
||||||
package bisq.common.app;
|
package bisq.common.app;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkArgument;
|
import static com.google.common.base.Preconditions.checkArgument;
|
||||||
|
@ -29,6 +32,11 @@ public class Version {
|
||||||
// We use semantic versioning with major, minor and patch
|
// We use semantic versioning with major, minor and patch
|
||||||
public static final String VERSION = "1.3.9";
|
public static final String VERSION = "1.3.9";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds a list of the versions of tagged resource files for optimizing the getData requests.
|
||||||
|
*/
|
||||||
|
public static final List<String> HISTORY = Arrays.asList("1.4.0");
|
||||||
|
|
||||||
public static int getMajorVersion(String version) {
|
public static int getMajorVersion(String version) {
|
||||||
return getSubVersion(version, 0);
|
return getSubVersion(version, 0);
|
||||||
}
|
}
|
||||||
|
@ -45,7 +53,7 @@ public class Version {
|
||||||
return isNewVersion(newVersion, VERSION);
|
return isNewVersion(newVersion, VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean isNewVersion(String newVersion, String currentVersion) {
|
public static boolean isNewVersion(String newVersion, String currentVersion) {
|
||||||
if (newVersion.equals(currentVersion))
|
if (newVersion.equals(currentVersion))
|
||||||
return false;
|
return false;
|
||||||
else if (getMajorVersion(newVersion) > getMajorVersion(currentVersion))
|
else if (getMajorVersion(newVersion) > getMajorVersion(currentVersion))
|
||||||
|
|
Loading…
Add table
Reference in a new issue