Skip to content

Commit 5c251da

Browse files
authored
moves cleaning and build process out into pipeline (#61)
1 parent 2cb6645 commit 5c251da

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- checkout
2727
- run:
2828
name: Run build
29-
command: clojure -T:build build
29+
command: clojure -T:build clean && clojure -T:build build
3030

3131
test:
3232
executor: clojure-tools-deps-tests
@@ -45,15 +45,15 @@ jobs:
4545
command: dockerize -wait tcp://localhost:8108 -timeout 1m
4646
- run:
4747
name: Run test
48-
command: clojure -T:build tests
48+
command: clojure -T:build clean && clojure -T:build tests
4949

5050
deploy-clojars:
5151
executor: clojure-tools-deps
5252
steps:
5353
- checkout
5454
- run:
5555
name: Deploy to Clojars
56-
command: clojure -T:build deploy
56+
command: clojure -T:build clean && clojure -T:build build && clojure -T:build deploy
5757

5858
workflows:
5959
primary:

build.clj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@
3434
{:keys [exit]} (b/process cmds)]
3535
(when-not (zero? exit) (throw (ex-info "Task failed" {})))))
3636

37-
(defn clean []
37+
(defn clean [_]
3838
(b/delete {:path "target"}))
3939

4040
(defn build [_]
41-
(clean)
4241
(b/write-pom {:pom-data pom-template
4342
:class-dir class-dir
4443
:lib lib
@@ -51,11 +50,8 @@
5150
:jar-file jar-file}))
5251

5352
(defn tests [_]
54-
(clean)
5553
(run-task [:test :runner]))
5654

5755
(defn deploy [_]
58-
(clean)
59-
(build)
6056
(d/deploy {:installer :remote :artifact (b/resolve-path jar-file)
6157
:pom-file (b/pom-path {:class-dir class-dir :lib lib})}))

0 commit comments

Comments
 (0)