Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.0 Snapshot #735

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Binary file added .github/boot-clj.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

*.jar
*.war
pom.xml
#pom.xml
pom.xml.asc

### NREPL ######################################################################
Expand Down
11 changes: 4 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ jdk:
- openjdk12
- openjdk13

install: make deps
script: make test
services:
- docker

cache:
directories:
- $HOME/.m2
- $HOME/.boot/cache
- $HOME/bin
install: curl https://raw.githubusercontent.com/boot-clj/docker-boot/master/boot/3/Dockerfile | docker build -t bootclj/boot:latest -f - .
script: docker run -t bootclj/boot:latest cd ~/.boot/cache/bin/3.0.0-SNAPSHOT/ && ls -a
21 changes: 9 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ aetheruber = aether.uber.jar
workerjar = boot/worker/target/worker-$(version).jar
corejar = boot/core/target/core-$(version).jar
basejar = boot/base/target/base-$(version).jar
baseuber = boot/base/target/base-$(version)-jar-with-dependencies.jar
baseuber = boot/base/target/base-$(version)-standalone.jar
alljars = $(podjar) $(aetherjar) $(workerjar) $(corejar) $(baseuber) $(bootjar)
java_version = $(shell java -version 2>&1 | awk -F '"' '/version/ {print $$2}' |awk -F. '{print $$1 "." $$2}')

Expand All @@ -23,7 +23,7 @@ help:
@echo "Usage: make {help|deps|install|deploy|test|clean}" 1>&2 && false

clean:
(cd boot/base && mvn -q clean && rm -f src/main/resources/$(aetheruber))
(cd boot/base && lein clean && rm -f src/main/resources/$(aetheruber))
(cd boot/core && lein clean)
(cd boot/aether && lein clean)
(cd boot/pod && lein clean)
Expand All @@ -44,14 +44,8 @@ bin/boot: mkdirs

deps: bin/lein bin/boot

$(bootjar): $(verfile) boot/boot/project.clj
(cd boot/boot && lein install)

boot/base/pom.xml: $(verfile) boot/base/pom.in.xml
(cd boot/base && cat pom.in.xml |sed 's/__VERSION__/$(version)/' > pom.xml)

$(basejar): boot/base/pom.xml $(shell find boot/base/src/main/java)
(cd boot/base && mvn -q install)
$(basejar): $(verfile) boot/base/project.clj $(shell find boot/base/src/main/java)
(cd boot/base && lein install)

$(podjar): $(verfile) boot/pod/project.clj $(shell find boot/pod/src)
(cd boot/pod && lein install)
Expand All @@ -67,8 +61,11 @@ $(workerjar): $(verfile) boot/worker/project.clj $(shell find boot/worker/src)
$(corejar): $(verfile) boot/core/project.clj $(shell find boot/core/src)
(cd boot/core && lein install)

$(baseuber): boot/base/pom.xml $(shell find boot/base/src/main)
(cd boot/base && mvn -q assembly:assembly -DdescriptorId=jar-with-dependencies)
$(baseuber): boot/base/project.clj $(shell find boot/base/src/main)
(cd boot/base && lein uberjar)

$(bootjar): $(verfile) boot/boot/project.clj
(cd boot/boot && lein install)

.installed: mkdirs $(basejar) $(alljars)
cp $(baseuber) $(distjar)
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<a href="http://boot-clj.com/">
<img src="http://boot-clj.com/assets/images/logos/boot-logo-3.png" alt="Boot Logo" title="Boot" align="right" width="225px" />
</a>

# Boot
<p align="center"><img src="/.github/boot-clj.png" alt="boot-clj" width="100%"></p>

[![Build Status](https://travis-ci.org/boot-clj/boot.svg?branch=master)](https://travis-ci.org/boot-clj/boot) [![Stories in Ready][waffle-badge]][waffle-board] [![Backers on Open Collective](https://opencollective.com/boot-clj/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/boot-clj/sponsors/badge.svg)](#sponsors)
Expand Down Expand Up @@ -174,7 +170,7 @@ boot -r src -d me.raynes/conch:0.8.0 -- pom -p my-project -v 0.1.0 -- jar -M Foo
```

What we did here was we built a pipeline on the command line and ran it to
build our project.
build our project.

* We specified the resource directory (files that will end up in the jar) via boot's `-r` option.
* We added the `conch` dependency via boot's `-d` option.
Expand Down Expand Up @@ -205,7 +201,7 @@ First we'll set some global boot options–we'll set the source directory and ad
the `conch` dependency to the build environment:

```clojure
boot.user=> (set-env!
boot.user=> (set-env!
#_=> :resource-paths #{"src"}
#_=> :dependencies '[[me.raynes/conch "0.8.0"]])
```
Expand Down
1 change: 1 addition & 0 deletions boot.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BOOT_AS_ROOT=yes
2 changes: 1 addition & 1 deletion boot/aether/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
:repositories [["clojars" {:url "https://clojars.org/repo" :creds :gpg :sign-releases false}]]
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0" :scope "compile"]
:dependencies [[org.clojure/clojure "1.9.0" :scope "compile"]
[boot/base ~version :scope "provided"]
[boot/pod ~version :scope "compile"]
[com.cemerick/pomegranate "1.0.0" :scope "compile"]
Expand Down
98 changes: 0 additions & 98 deletions boot/base/pom.in.xml

This file was deleted.

20 changes: 20 additions & 0 deletions boot/base/project.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
(import [java.util Properties])
(require '[clojure.java.io :as io])
(def propsfile "../../version.properties")
(def version (-> (doto (Properties.) (.load (io/input-stream propsfile)))
(.getProperty "version")))

(defproject boot/base version
:aot [#"^(?!boot\.repl-server).*$"]
:jar-exclusions [#"^clojure/core/"]
:java-source-paths ["src/main/java"]
:description "Boot base module–this is the classloader shim."
:url "https://github.com/boot-clj/boot"
:scm {:url "https://github.com/boot-clj/boot.git" :dir "../../"}
:repositories [["clojars" {:url "https://clojars.org/repo" :creds :gpg :sign-releases false}]
["sonatype" {:url "https://oss.sonatype.org/content/repositories/releases"}]
["sonatype-snaps" {:url "https://oss.sonatype.org/content/repositories/snapshots"}]]
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.projectodd.shimdandy/shimdandy-api "1.2.1" :scope "compile"]
[junit/junit "3.8.1" :scope "test"]])
1 change: 0 additions & 1 deletion boot/core/build.boot
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

(require '[boot.test :refer [runtests test-report test-exit]]
'[metosin.boot-alt-test :refer [alt-test]]
'boot.task.built-in-test
'boot.test-test)

(import boot.App)
Expand Down
3 changes: 1 addition & 2 deletions boot/core/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
:repositories [["clojars" {:url "https://clojars.org/repo" :creds :gpg :sign-releases false}]]
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0" :scope "provided"]
:dependencies [[org.clojure/clojure "1.9.0" :scope "provided"]
[boot/base ~version :scope "provided"]
[boot/pod ~version :scope "compile"]])

52 changes: 52 additions & 0 deletions boot/core/src/boot/help.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
(ns boot.help
(:require [boot.core :as core]
[boot.main :as main]
[boot.task-helpers :as helpers]
[boot.from.table.core :as table]
[clojure.string :as string]))


(core/deftask help
"Print usage info and list available tasks."
[]
(core/with-pass-thru [_]
(let [tasks (#'helpers/available-tasks 'boot.user)
opts (->> main/cli-opts (mapv (fn [[x y z]] ["" (str x " " y) z])))
envs [["" "BOOT_AS_ROOT" "Set to 'yes' to allow boot to run as root."]
["" "BOOT_CERTIFICATES" "Specify certificate file paths."]
["" "BOOT_CLOJARS_REPO" "Specify the url for the 'clojars' Maven repo."]
["" "BOOT_CLOJARS_MIRROR" "Specify the mirror url for the 'clojars' Maven repo."]
["" "BOOT_CLOJURE_VERSION" "The version of Clojure boot will provide (1.8.0)."]
["" "BOOT_CLOJURE_NAME" "The artifact name of Clojure boot will provide (org.clojure/clojure)."]
["" "BOOT_COLOR" "Set to 'no' to turn colorized output off."]
["" "BOOT_FILE" "Build script name (build.boot)."]
["" "BOOT_GPG_COMMAND" "System gpg command (gpg)."]
["" "BOOT_HOME" "Directory where boot stores global state (~/.boot)."]
["" "BOOT_WATCHERS_DISABLE" "Set to 'yes' to turn off inotify/FSEvents watches."]
["" "BOOT_JAVA_COMMAND" "Specify the Java executable (java)."]
["" "BOOT_JVM_OPTIONS" "Specify JVM options (Unix/Linux/OSX only)."]
["" "BOOT_LOCAL_REPO" "The local Maven repo path (~/.m2/repository)."]
["" "BOOT_MAVEN_CENTRAL_REPO" "Specify the url for the 'maven-central' Maven repo."]
["" "BOOT_MAVEN_CENTRAL_MIRROR" "Specify the mirror url for the 'maven-central' Maven repo."]
["" "BOOT_VERSION" "Specify the version of boot core to use."]
["" "BOOT_WARN_DEPRECATED" "Set to 'no' to suppress deprecation warnings."]]
files [["" "./boot.properties" "Specify boot options for this project."]
["" "./profile.boot" "A script to run after the global profile.boot but before the build script."]
["" "BOOT_HOME/boot.properties" "Specify global boot options."]
["" "BOOT_HOME/profile.boot" "A script to run before running the build script."]]
br #(conj % ["" "" ""])]
(printf "\n%s\n"
(-> [["" ""] ["Usage:" "boot OPTS <task> TASK_OPTS <task> TASK_OPTS ..."]]
(table/table :style :none)
with-out-str))
(printf "%s\n\nDo `boot <task> -h` to see usage info and TASK_OPTS for <task>.\n"
(->> (-> [["" "" ""]]
(into (#'helpers/set-title opts "OPTS:")) (br)
(into (#'helpers/set-title (#'helpers/tasks-table tasks) "Tasks:")) (br)
(into (#'helpers/set-title envs "Env:")) (br)
(into (#'helpers/set-title files "Files:"))
(table/table :style :none)
with-out-str
(string/split #"\n"))
(map string/trimr)
(string/join "\n"))))))
4 changes: 2 additions & 2 deletions boot/core/src/boot/main.clj
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
(with-out-str (pp/write form :dispatch pp/code-dispatch)))))

(defn emit [boot? argv userscript localscript bootscript import-ns inits]
(let [boot-use '[boot.core boot.util boot.task.built-in]]
(let [boot-use '[boot.core boot.util boot.help]]
(str
(string/join
"\n\n"
Expand All @@ -104,7 +104,7 @@
`(let [boot?# ~boot?]
(if-not boot?#
(when-let [main# (resolve 'boot.user/-main)] (main# ~@argv))
(core/boot ~@(or (seq argv) ["boot.task.built-in/help"])))))]))
(core/boot ~@(or (seq argv) ["boot.help/help"])))))]))
"\n")))

(defn shebang? [arg]
Expand Down
2 changes: 1 addition & 1 deletion boot/pod/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[boot/base ~version :scope "provided"]
[org.clojure/clojure "1.6.0" :scope "provided"]
[org.clojure/clojure "1.9.0" :scope "provided"]
[org.tcrawley/dynapath "1.0.0" :scope "compile"]
[org.projectodd.shimdandy/shimdandy-impl "1.2.0" :scope "compile"]])
8 changes: 8 additions & 0 deletions boot/pod/src/boot/util/spec.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(ns boot.util.spec
(:require
[clojure.spec.alpha :as s]
[boot.util :as util]))

(s/fdef util/dep-as-map
:args (s/coll-of any?)
:ret map?)
Loading