-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bb.edn
68 lines (55 loc) · 2.92 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
{:paths ["bb"]
:tasks
{:requires ([tasks :as tasks]
[logger :refer [log]]
[babashka.fs :as fs]
[clojure.string :as string]
[changelog])
:init
(do (log "bb.edn running task"))
test (tasks/shell-and-log (str "./addons/gdUnit4/runtest.sh -c -a test"))
test-match (let [arg (some-> *command-line-args* first)]
(tasks/shell-and-log (str "./addons/gdUnit4/runtest.sh -c -a " arg)))
watch tasks/watch
serve-web
{:extra-deps {org.babashka/http-server {:local/root "../../russmatney/http-server"}}
:requires ([babashka.http-server :as http-server])
:task (http-server/exec {:port 3010 :dir (str "dist/web")})}
generate-boxart
{:description ""
:task (tasks/generate-all-boxart)}
gd-plug
(tasks/shell-and-log
(str "godot --no-window -s plug.gd " (string/join " " *command-line-args*)))
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))
butler-push (let [arg (some-> *command-line-args* first)
arg (or arg "blox")
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))
}}