Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
boot-clj plugin to report build status to AnyBar
(defn- send-udp [s port]
(with-open [socket (]
(let [group ( "localhost")
bytes (.getBytes s)
packet ( bytes (count bytes) group port)]
(.send socket packet)
(.close socket))))
(deftask anybar [p port VAL int "AnyBar port"]
(let [port (or port 1738)]
(fn [next-task]
(fn [fileset]
(send-udp "white" port)
(boot.util/with-let [_ (next-task fileset)]
(if (zero? @boot.core/*warnings*)
(send-udp "black" port)
(send-udp "orange" port)))
(catch Throwable t
(send-udp "red" port)
(throw t)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.