From b5ea8a704de661893be889aaa8b9511e52534d74 Mon Sep 17 00:00:00 2001 From: Martin Klepsch Date: Tue, 9 Jan 2018 12:45:15 +0100 Subject: [PATCH] Download boot/base jars from Clojars (disabled) This change shouldn't have any effect until the respective FEATURE FLAG is switched on. --- src/Boot.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Boot.java b/src/Boot.java index c249f00..7418120 100644 --- a/src/Boot.java +++ b/src/Boot.java @@ -182,7 +182,17 @@ public class Boot { public static String downloadUrl(String version, String name) throws Exception { - return String.format("https://github.com/boot-clj/boot/releases/download/%s/%s", version, name); } + // FEATURE FLAG - Enabling this will all cause all non-snapshot + // releases from 2.8 onwards to be downloaded from Clojars + Boolean clojarsDownloadEnabled = false; + if (clojarsDownloadEnabled && + 0 < version.compareTo("2.8") && + !version.endsWith("SNAPSHOT") && + name.equals("boot.jar")) { + String urlFormat = "https://repo.clojars.org/boot/base/%s/base-%s-uber.jar"; + return String.format(urlFormat, version, version); + } else { // 2.7.2 and lower download releases from github + return String.format("https://github.com/boot-clj/boot/releases/download/%s/%s", version, name); }} public static File validateBinaryFile(File f) throws Exception {