forked from Qortal/qortal
More flexible auto-update locations
This commit is contained in:
parent
1d7bda5d46
commit
4ced9cc3e2
@ -149,7 +149,7 @@ public class AutoUpdate extends Thread {
|
|||||||
|
|
||||||
private static boolean attemptUpdate(byte[] commitHash, byte[] downloadHash, String repoBaseUri) {
|
private static boolean attemptUpdate(byte[] commitHash, byte[] downloadHash, String repoBaseUri) {
|
||||||
LOGGER.info(String.format("Fetching update from %s", repoBaseUri));
|
LOGGER.info(String.format("Fetching update from %s", repoBaseUri));
|
||||||
InputStream in = ApiRequest.fetchStream(repoBaseUri + "/raw/" + HashCode.fromBytes(commitHash).toString() + "/" + JAR_FILENAME);
|
InputStream in = ApiRequest.fetchStream(String.format(repoBaseUri, HashCode.fromBytes(commitHash).toString()));
|
||||||
if (in == null) {
|
if (in == null) {
|
||||||
LOGGER.warn(String.format("Failed to fetch update from %s", repoBaseUri));
|
LOGGER.warn(String.format("Failed to fetch update from %s", repoBaseUri));
|
||||||
return false; // failed - try another repo
|
return false; // failed - try another repo
|
||||||
|
@ -83,7 +83,7 @@ public class Settings {
|
|||||||
|
|
||||||
// Auto-update sources
|
// Auto-update sources
|
||||||
private String[] autoUpdateRepos = new String[] {
|
private String[] autoUpdateRepos = new String[] {
|
||||||
"https://github.com/catbref/qora-core"
|
"https://github.com/catbref/qora-core/raw/%s/qora-core.jar"
|
||||||
};
|
};
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
Loading…
Reference in New Issue
Block a user