Skip to content

Commit

Permalink
moves cleaning and build process out into pipeline (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
runeanielsen authored Jun 9, 2024
1 parent 2cb6645 commit 5c251da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- checkout
- run:
name: Run build
command: clojure -T:build build
command: clojure -T:build clean && clojure -T:build build

test:
executor: clojure-tools-deps-tests
Expand All @@ -45,15 +45,15 @@ jobs:
command: dockerize -wait tcp://localhost:8108 -timeout 1m
- run:
name: Run test
command: clojure -T:build tests
command: clojure -T:build clean && clojure -T:build tests

deploy-clojars:
executor: clojure-tools-deps
steps:
- checkout
- run:
name: Deploy to Clojars
command: clojure -T:build deploy
command: clojure -T:build clean && clojure -T:build build && clojure -T:build deploy

workflows:
primary:
Expand Down
6 changes: 1 addition & 5 deletions build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@
{:keys [exit]} (b/process cmds)]
(when-not (zero? exit) (throw (ex-info "Task failed" {})))))

(defn clean []
(defn clean [_]
(b/delete {:path "target"}))

(defn build [_]
(clean)
(b/write-pom {:pom-data pom-template
:class-dir class-dir
:lib lib
Expand All @@ -51,11 +50,8 @@
:jar-file jar-file}))

(defn tests [_]
(clean)
(run-task [:test :runner]))

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

0 comments on commit 5c251da

Please sign in to comment.