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

WIP: Fetch from Clojars & better SNAPSHOT support #11

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/Boot.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down