Skip to content

Instantly share code, notes, and snippets.

@ccfontes
Created August 23, 2014 01:14
Show Gist options
  • Save ccfontes/de2347b9e5ef31b8e760 to your computer and use it in GitHub Desktop.
Save ccfontes/de2347b9e5ef31b8e760 to your computer and use it in GitHub Desktop.
Verifies if the Clojurescript sources were modified since last build.
#!/usr/bin/env hy
; Author: <Carlos C. Fontes> [email protected]
(defn cljs-modified?
"""Verifies if the Clojurescript sources were modified since last build."""
[]
(let [ls-by-time-modified (partial ls "-t")]
(-> (glob "src-cljs/app/*.cljs")
(ls-by-time-modified "resources/public/js/main.js")
.split
first
(.split ".")
.pop
(= "cljs"))))
(if-not (cljs-modified?)
(sys.exit 1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment