Skip to content
This repository was archived by the owner on Jan 25, 2019. It is now read-only.

Commit b5ea8a7

Browse files
committed
Download boot/base jars from Clojars (disabled)
This change shouldn't have any effect until the respective FEATURE FLAG is switched on.
1 parent c5760f9 commit b5ea8a7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Boot.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,17 @@ public class Boot {
182182

183183
public static String
184184
downloadUrl(String version, String name) throws Exception {
185-
return String.format("https://github.com/boot-clj/boot/releases/download/%s/%s", version, name); }
185+
// FEATURE FLAG - Enabling this will all cause all non-snapshot
186+
// releases from 2.8 onwards to be downloaded from Clojars
187+
Boolean clojarsDownloadEnabled = false;
188+
if (clojarsDownloadEnabled &&
189+
0 < version.compareTo("2.8") &&
190+
!version.endsWith("SNAPSHOT") &&
191+
name.equals("boot.jar")) {
192+
String urlFormat = "https://repo.clojars.org/boot/base/%s/base-%s-uber.jar";
193+
return String.format(urlFormat, version, version);
194+
} else { // 2.7.2 and lower download releases from github
195+
return String.format("https://github.com/boot-clj/boot/releases/download/%s/%s", version, name); }}
186196

187197
public static File
188198
validateBinaryFile(File f) throws Exception {

0 commit comments

Comments
 (0)