Skip to content

Instantly share code, notes, and snippets.

Created July 9, 2017 02:05
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mfikes/8be162fd730774e11990255345ee1127 to your computer and use it in GitHub Desktop.

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:

  1. 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")]
  2. I added a minimal ".travis.yml-only" repo at which clones and builds Planck and runs its tests
  3. 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
  4. 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
  5. I chose which ClojureScript version I wanted to trigger the Planck build with: body='{"request": {"branch":"master", "config": {"env": {"CLOJURESCRIPT_VERSION": "1.9.671"}}}}'
  6. 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"
  7. Observed the environment variable being set in the Travis web UI log: export CLOJURESCRIPT_VERSION=1.9.671
  8. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment