Repository navigation
Expand file tree
/
Copy pathbb.edn
More file actions
49 lines (49 loc) · 2.31 KB
/
Copy pathbb.edn
File metadata and controls
49 lines (49 loc) · 2.31 KB
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
{:paths ["release"]
:deps {babashka/process {:mvn/version "0.6.25"}
babashka/fs {:mvn/version "0.5.32"}
org.clj-commons/pretty {:mvn/version "3.8.0"}}
:tasks
{:requires ([babashka.process :as p]
[babashka.fs :as fs]
[clojure.string :as string]
[clj-commons.ansi :refer [pout]]
[release :as r :refer [sh]])
package (r/package "test")
refresh-libs (let [source-dir (fs/path "../dialog")
cp (fn [name to-dir]
(pout name " ...")
(fs/copy (fs/path source-dir name)
(fs/path to-dir name)
{:replace-existing true}))]
(cp "stdlib.dg" "lib/dialog")
(cp "stddebug.dg" "lib/dialog/debug"))
release (let [tag (sh {:out :string} "git describe --tags --abbrev=0")
zip-file (r/package tag)
sha (r/sha256 zip-file)
create-opts (cond-> ["--verify-tag" "--generate-notes"]
(string/includes? tag "alpha")
(conj "--prerelease"))]
(apply sh "gh release create" tag create-opts)
(sh "gh release upload --clobber" tag zip-file)
(println)
(pout "Release URL: "
[:bold
"https://github.com/hlship/dialog-extensions/releases/tag/" tag])
(pout " Asset URL: "
[:bold "https://github.com/hlship/dialog-extensions/releases/download/"
tag "/" (fs/file-name zip-file)])
(pout " SHA256: " [:bold sha]))
test {:doc "Run all tests"
:task (doseq [dir ["barmaid"
"conferences"
"exchange"
"immediate"
"quest"
"tree"
"wanderer"
"penny"
"who"]]
(pout "Testing " [:bold dir] " ...")
(shell {:continue true
:dir dir}
"dgt skein test"))}}}