Skip to content

Commit 993a43c

Browse files
committed
[ci] Fix build
1 parent cb4c652 commit 993a43c

File tree

3 files changed

+27
-13
lines changed

3 files changed

+27
-13
lines changed

.github/workflows/continuous-deployment-workflow.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ jobs:
9696
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
9797
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }}
9898
CLOJARS_TOKEN: ${{ secrets.CLOJARS_TOKEN }}
99+
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_TOKEN }}
99100
GITHUB_USERNAME: ${{ github.actor }}
100101
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101102

bb.edn

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
{:min-bb-version "0.4.0"
22
:tasks
3-
{:requires ([babashka.fs :as fs])
3+
{:requires ([babashka.fs :as fs]
4+
[clojure.string :as str])
5+
:init (do
6+
(defn release-tag [& {:keys [dir]}]
7+
(->> (shell {:out :string
8+
:dir dir}
9+
"git tag -l --sort=v:refname")
10+
:out
11+
str/split-lines
12+
(filter (fn [s]
13+
(re-find (re-pattern "^v\\d+\\.\\d+\\.\\d+$") s)))
14+
last
15+
str/trim))
16+
(def opts {:extra-env {"DAY8_RELEASE_TAG" (release-tag)}}))
417
clean (let [clean-targets ["node_modules"
518
"run/resources/public/compiled_dev "
619
"run/resources/public/compiled_prod"
@@ -9,27 +22,27 @@
922
(println "bb clean: deleting" target)
1023
(fs/delete-tree target)))
1124
install (shell "npm install")
12-
test {:depends [clean install]
13-
:task (do (shell "npx shadow-cljs compile karma-test")
14-
(shell "npx karma start --single-run --reporters junit,dots"))}
25+
test {:depends [install]
26+
:task (do (shell opts "npx shadow-cljs compile karma-test")
27+
(shell opts "npx karma start --single-run --reporters junit,dots"))}
1528
jar {:depends [clean]
16-
:task (shell "clojure -T:build jar")}
29+
:task (shell opts "clojure -T:build jar")}
1730
release-clojars {:depends [jar]
18-
:task (shell "clojure -T:build clojars")}
31+
:task (shell opts "clojure -T:build clojars")}
1932
release-demo {:depends [clean install]
20-
:task (shell "npx shadow-cljs release demo")}
33+
:task (shell opts "npx shadow-cljs release demo")}
2134
ci {:depends [install test clean install release-demo]}
2235
build-report-ci {:depends [install]
23-
:task (shell "npx shadow-cljs clj-run shadow.cljs.build-report demo"
36+
:task (shell opts "npx shadow-cljs clj-run shadow.cljs.build-report demo"
2437
"target/build-report.html")}
2538
watch {:depends [install]
26-
:task (shell "npx shadow-cljs watch demo browser-test karma-test")}
39+
:task (shell opts "npx shadow-cljs watch demo browser-test karma-test")}
2740
watch-demo {:depends [install]
28-
:task (shell "npx shadow-cljs watch demo")}
41+
:task (shell opts "npx shadow-cljs watch demo")}
2942
browser-test {:depends [install]
30-
:task (shell "npx shadow-cljs watch browser-test")}
43+
:task (shell opts "npx shadow-cljs watch browser-test")}
3144
deploy-aws {:depends [ci]
32-
:task (shell "aws s3 sync run/resources/public s3://re-demo/ --acl"
45+
:task (shell opts "aws s3 sync run/resources/public s3://re-demo/ --acl"
3346
"public-read"
3447
"--cache-control"
3548
"max-age=2592000,public")}}}

build.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[clojure.tools.build.api :as b]))
44

55
(def lib 're-com/re-com)
6-
(def version (System/getenv "DAY8_APP_VERSION"))
6+
(def version (System/getenv "DAY8_RELEASE_TAG"))
77
(def main-ns 're-com.core)
88
(def class-dir "target/classes")
99
(def basis (delay (b/create-basis {})))

0 commit comments

Comments
 (0)