Skip to content

Commit a8aeaf1

Browse files
committed
Switch to build.clj
1 parent b8384fa commit a8aeaf1

File tree

5 files changed

+34
-70
lines changed

5 files changed

+34
-70
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
*.iml
55
gcp-api-descriptors
66
creds.json
7-
lib.jar
7+
lib.jar
8+
pom.xml
9+
target

bin/deploy-jar.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,5 @@
22

33
set -euo pipefail
44

5-
echo "building jar..."
6-
clojure -Spom
7-
clojure -A:jar
8-
9-
echo "deploying..."
10-
mvn deploy:deploy-file -Dfile=lib.jar -DrepositoryId=clojars -Durl=https://clojars.org/repo -DpomFile=pom.xml
5+
clojure -T:build jar
6+
clojure -T:build deploy

build.clj

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
(ns build
2+
(:require
3+
[clojure.tools.build.api :as b]
4+
[org.corfield.build :as bb]))
5+
6+
(def lib 'gcp-api/gcp-api)
7+
(def version (format "1.0.%s" (b/git-count-revs nil)))
8+
9+
(defn jar "Build lib jar." [opts]
10+
(-> (assoc opts :lib lib :version version)
11+
(bb/clean)
12+
(bb/jar))
13+
opts)
14+
15+
(defn deploy "Deploy the JAR to Clojars." [opts]
16+
(-> opts
17+
(assoc :lib lib :version version)
18+
(bb/deploy)))

deps.edn

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
{:paths ["src"]
2-
:deps {org.clojure/core.async {:mvn/version "1.3.610"}
2+
:deps {org.clojure/core.async {:mvn/version "1.5.648"}
33
com.cognitect/anomalies {:mvn/version "0.1.12"}
4-
org.clojure/data.json {:mvn/version "1.0.0"}
5-
com.google.auth/google-auth-library-oauth2-http {:mvn/version "0.21.1"}
6-
java-http-clj/java-http-clj {:mvn/version "0.4.1"}}
4+
org.clojure/data.json {:mvn/version "2.4.0"}
5+
com.google.auth/google-auth-library-oauth2-http {:mvn/version "1.6.0"}
6+
java-http-clj/java-http-clj {:mvn/version "0.4.3"}}
77
:aliases {:test {:extra-paths ["test"]
88
:extra-deps {provisdom/test {:git/url "https://github.com/Provisdom/test.git"
9-
:sha "f6a10aa33d7cafacd78ea948b99f24b9a6b5ed30"}
10-
org.clojure/test.check {:mvn/version "1.1.0"}}}
11-
:test-runner {:extra-deps {lambdaisland/kaocha {:mvn/version "1.0.672"}}
9+
:sha "c12852d4dbe90ed5a6a8675618cfbf49eed60970"}
10+
org.clojure/test.check {:mvn/version "1.1.1"}}}
11+
:build {:deps {io.github.seancorfield/build-clj {:git/tag "v0.8.0" :git/sha "9bd8b8a"}}
12+
:ns-default build}
13+
:test-runner {:extra-deps {lambdaisland/kaocha {:mvn/version "1.64.1010"}}
1214
:main-opts ["-m" "kaocha.runner"]}
1315
:dev {:extra-paths ["resources" "env" "gcp-api-descriptors"]
14-
:extra-deps {com.climate/claypoole {:mvn/version "1.1.4"}
15-
gcp-api/compute {:git/url "https://github.com/ComputeSoftware/gcp-api-descriptors.git"
16-
:sha "7b00d7c1ff31b03e9cd7df4189ae8dd8e533eec4"
17-
:deps/root "compute/v1"}}}
18-
:descriptors {:extra-deps {gcp-api/descriptors {:local/root "gcp-api-descriptors"}}}
19-
:jar {:extra-deps {seancorfield/depstar {:mvn/version "1.1.104"}}
20-
:main-opts ["-m" "hf.depstar.jar" "lib.jar"]}}}
16+
:extra-deps {com.climate/claypoole {:mvn/version "1.1.4"}}}
17+
:descriptors {:extra-deps {gcp-api/descriptors {:local/root "gcp-api-descriptors"}}}}}

pom.xml

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)