From b18f96c1d69599132c94fa352308223a715559b3 Mon Sep 17 00:00:00 2001 From: e507802 Date: Wed, 29 May 2019 15:31:45 +0200 Subject: [PATCH 1/3] fix regression from PR #221 when bootstrapping into empty directory with -Dappbase=... the version from the fetched getdown.txt must be extracted before calling processArg(SysProps.overrideAppbase(_appbase)) - otherwise _version is -1 instead of the version provided in the just downloaded getdown.txt. --- .../main/java/com/threerings/getdown/data/Application.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/threerings/getdown/data/Application.java b/core/src/main/java/com/threerings/getdown/data/Application.java index fa132f9..06eab4d 100644 --- a/core/src/main/java/com/threerings/getdown/data/Application.java +++ b/core/src/main/java/com/threerings/getdown/data/Application.java @@ -579,6 +579,9 @@ public class Application config = new Config(cdata); } + // extract our version information + _version = config.getLong("version", -1L); + // first determine our application base, this way if anything goes wrong later in the // process, our caller can use the appbase to download a new configuration file _appbase = config.getString("appbase"); @@ -594,9 +597,6 @@ public class Application _appbase = _appbase + "/"; } - // extract our version information - _version = config.getLong("version", -1L); - // if we are a versioned deployment, create a versioned appbase try { _vappbase = createVAppBase(_version); From bf0f0deecbbcfa6f9f79970851c4a446aaf10a21 Mon Sep 17 00:00:00 2001 From: e507802 Date: Wed, 29 May 2019 15:49:37 +0200 Subject: [PATCH 2/3] fix regression from PR #221 when bootstrapping into an empty directory with -Dappbase parameter, the version must be read first from the configuration in order to create a valid appbase after re-reading the just downloaded getdown.txt (in verisoned mode) --- .../java/com/threerings/getdown/data/Application.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/threerings/getdown/data/Application.java b/core/src/main/java/com/threerings/getdown/data/Application.java index a1deca4..80ea812 100644 --- a/core/src/main/java/com/threerings/getdown/data/Application.java +++ b/core/src/main/java/com/threerings/getdown/data/Application.java @@ -594,7 +594,10 @@ public class Application * like the appbase and version. */ public void initBase (Config config) throws IOException { - // first determine our application base, this way if anything goes wrong later in the + // first extract our version information + _version = config.getLong("version", -1L); + + // determine our application base, this way if anything goes wrong later in the // process, our caller can use the appbase to download a new configuration file _appbase = config.getString("appbase"); if (_appbase == null) { @@ -609,9 +612,6 @@ public class Application _appbase += "/"; } - // extract our version information - _version = config.getLong("version", -1L); - // if we are a versioned deployment, create a versioned appbase try { _vappbase = createVAppBase(_version); From 4a63a0262cbc3e32062e936d9541ca325e252bb5 Mon Sep 17 00:00:00 2001 From: e507802 Date: Wed, 29 May 2019 16:03:56 +0200 Subject: [PATCH 3/3] make IT text files for IT tests checkout with correct line endings on windows (to create correct hash in DigestIT.java) also hide project files of a modern IDE ;) --- .gitattributes | 3 +++ .gitignore | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..eab01fc --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +*.txt eol=lf +*#txt eol=lf +*.sh eol=lf diff --git a/.gitignore b/.gitignore index 7034578..9915552 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /*/target/ /target/ core/src/main/java/com/threerings/getdown/data/Build.java +*.iml