-
Notifications
You must be signed in to change notification settings - Fork 0
/
bb.edn
39 lines (39 loc) · 2.24 KB
/
bb.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{:paths ["src" "script"]
:deps {}
:tasks {:requires ([babashka.fs :as fs])
-input-dir "input"
-input {:depends [-input-dir]
:task (fs/create-dirs -input-dir)}
-auth-file "auth.edn"
-solution-template-file "script/solution_template.clj"
get {:doc "Fetches a specific input (defaults to today)"
:depends [-auth-file -input]
:task (clojure (format "-T:aoc get-input :auth-file %s :input-dir %s %s"
-auth-file
-input
(apply str (interpose " " *command-line-args*))))}
new {:doc "Creates a skeleton solution for a specific day"
:depends [-solution-template-file]
:task (clojure (format "-T:aoc gen-new :solution-template %s %s"
-solution-template-file
(apply str (interpose " " *command-line-args*))))}
run {:doc "Executes the solution against the input"
:depends [-auth-file -input]
:task (clojure (format "-T:aoc run-solution :input-dir %s :auth-file %s %s"
-input
-auth-file
(apply str (interpose " " *command-line-args*))))}
bench {:doc "Benchmarks the solution against the input"
:depends [-auth-file -input]
:task (clojure (format "-T:aoc bench-solution :input-dir %s :auth-file %s %s"
-input
-auth-file
(apply str (interpose " " *command-line-args*))))}
test {:doc "Tests the solution agaist a sample"
:task (clojure (format "-T:aoc run-tests %s"
(apply str (interpose " " *command-line-args*))))}
auth {:doc "Set the auth for the Advent of Code API"
:depends [-auth-file]
:task (clojure (format "-T:aoc store-auth :auth-file %s :args %s"
-auth-file
(pr-str (pr-str *command-line-args*))))}}}