-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.edn
27 lines (27 loc) · 1.29 KB
/
release.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
;; bb --config release.edn
;; The bb.edn is for the dgt tool (shipped in the dialog-tool package),
;; this file contains things needed by dgt maintainers.
{:deps {org.clj-commons/pretty {:mvn/version "3.2.0"}}
:paths ["release"]
:tasks
{:requires ([clj-commons.ansi :refer [pout]]
[clojure.string :as string]
[babashka.fs :as fs]
[dgt.release :as r :refer [sh]])
release (let [tag (sh {:out :string} "git describe --tags --abbrev=0")
_ (sh {:dir "skein-ui"} "npm run build")
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-tool/releases/tag/" tag])
(pout " Asset URL: "
[:bold "https://github.com/hlship/dialog-tool/releases/download/"
tag "/" (fs/file-name zip-file)])
(pout " SHA256: " [:bold sha]))}}