In the context of cljs-oss
had success setting up Planck and triggering it to build with a specific version of ClojureScript. Here is a sketch:
- I changed Planck's
project.clj
to have a dep that can be driven by an environment variable:[org.clojure/clojurescript ~(or (System/getenv "CLOJURESCRIPT_VERSION") "1.9.660")]
- I added a minimal "
.travis.yml
-only" repo at https://github.com/cljs-oss/planck which clones and builds Planck and runs its tests - For the sake of running it in Travis, I forked this repo to my own GitHub account, but this step is just an optional pragmatic bit for now
- I installed the
travis
client, logged in using a GitHub personal access token created for this purpose, and then had it give me a Travis API token - I chose which ClojureScript version I wanted to trigger the Planck build with:
body='{"request": {"branch":"master", "config": {"env": {"CLOJURESCRIPT_VERSION": "1.9.671"}}}}'
- I triggered the build:
curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Travis-API-Version: 3" -H "Authorization: token XXtokenhereXXXX" -d "$body" https://api.travis-ci.org/repo/mfikes%2Fplanck-1/requests
- Observed the environment variable being set in the Travis web UI log:
export CLOJURESCRIPT_VERSION=1.9.671
- Confirmed that it was actually using this to build Planck by seeing
WARNING: Use of undeclared Var cljs.js/lib at line 450 out/cljs/js.cljs
which is in that version of ClojureScript