-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
bb.edn
73 lines (62 loc) · 3.26 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{:paths ["bb"]
:tasks
{:requires ([tasks :as tasks]
[logger :refer [log]]
[babashka.fs :as fs]
[clojure.string :as string]
[changelog])
:init
(do
(def godot-bin "/bin/godot422")
(log "bb.edn running task"))
test (tasks/shell-and-log
;; {:extra-env {"GODOT_BIN" godot-bin}}
(str "./addons/gdUnit4/runtest.sh -c -a test"))
test-match (let [arg (some-> *command-line-args* first)]
(tasks/shell-and-log
;; {:extra-env {"GODOT_BIN" godot-bin}}
(str "./addons/gdUnit4/runtest.sh -c -a " arg)))
watch tasks/watch
changelog (let [tag-overwrite (some-> *command-line-args* first)]
(changelog/rewrite-changelog {:latest-tag-label tag-overwrite})
(changelog/rewrite-changelog {:latest-tag-label tag-overwrite
:path "docs/changelog.md"})
;; TODO commit optional
;; (shell-and-log "git add CHANGELOG.md")
;; (shell-and-log "git commit -m 'docs: update changelog'")
)
export (tasks/export (some-> *command-line-args* first))
export-debug (tasks/export (some-> *command-line-args* first) {:debug? true})
build-web (tasks/build-web (some-> *command-line-args* first))
serve-built
{:extra-deps {org.babashka/http-server {:local/root "../../babashka/http-server"}}
:requires ([babashka.http-server :as http-server])
:task (let [arg (some-> *command-line-args* first)
arg (or arg "dino")]
(http-server/exec {:port 3010 :dir (str "dist/" arg)})
;; http-server installable via bbin
#_(tasks/shell-and-log (str "http-server --port 3010 --dir dist/" arg)))}
butler-push (let [arg (some-> *command-line-args* first)
arg (or arg "dino")
itch-project-name (or (some-> *command-line-args* second) arg)
dir (str "dist/" arg)
[arg type] (cond
(re-seq (re-pattern "-linux") arg)
[(-> arg (string/replace "-linux" "")) "linux-universal"]
(re-seq (re-pattern "-macos") arg)
(do
(println "DID YOU REMEMBER TO STAPLE IIIT???????")
[(-> arg (string/replace "-macos" "")) "osx-universal"])
(re-seq (re-pattern "-windows") arg)
[(-> arg (string/replace "-windows" "")) "windows"]
:else [arg "html5"])
itch-project (str "russmatney/" itch-project-name ":" type)
command (str "butler push --if-changed " dir " " itch-project)]
(log command)
;; (println command)
;; http-server installable via bbin
(tasks/shell-and-log command))
gd-plug
(tasks/shell-and-log
(str "godot --no-window -s plug.gd " (string/join " " *command-line-args*)))
}}