Skip to content

Commit 9ddbcfb

Browse files
author
awb99
committed
ci fixed
1 parent 7932eb4 commit 9ddbcfb

File tree

5 files changed

+55
-57
lines changed

5 files changed

+55
-57
lines changed

.github/workflows/ci.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ jobs:
3232
shell: bash
3333
- name: test-clj
3434
run: clojure -M:test
35-
#- name: clj-kondo
36-
# run: clojure -M:lint
37-
#- name: cloverage
38-
# run: clojure -M:cloverage
3935
- name: Release
4036
if: success()
4137
# if: github.event_name == 'push'
@@ -46,5 +42,5 @@ jobs:
4642
run: |
4743
git config --global user.email "[email protected]"
4844
git config --global user.name "CI/CD"
49-
clojure -M:release --patch
50-
git push --tags
45+
clojure -T:build jar
46+
clojure -T:build deploy

.github/workflows/pr.yml

-29
This file was deleted.

build.clj

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
(ns build
2+
(:require
3+
[clojure.tools.build.api :as b]
4+
[deps-deploy.deps-deploy :as dd]))
5+
6+
(def lib 'org.pinkgorilla/modular)
7+
(def version (format "0.2.%s" (b/git-count-revs nil)))
8+
(def class-dir "target/classes")
9+
(def basis (b/create-basis {:project "deps.edn"}))
10+
(def jar-file (format "target/%s-%s.jar" (name lib) version))
11+
12+
(defn clean [_]
13+
(b/delete {:path "target"}))
14+
15+
(def pom-template
16+
[[:licenses
17+
[:license
18+
[:name "Eclipse Public License"]
19+
[:url "https://www.eclipse.org/legal/epl-v10.html"]]]
20+
[:developers
21+
[:developer
22+
[:name "pink-gorilla"]]]
23+
[:scm
24+
[:url "https://github.com/pink-gorilla/modular"]
25+
[:connection "scm:git:git://github.com/pink-gorilla/modular.git"]
26+
[:developerConnection "scm:git:ssh://[email protected]/pink-gorilla/modular.git"]]])
27+
28+
(def opts {:class-dir class-dir
29+
:lib lib
30+
:version version
31+
:basis basis
32+
:pom-data pom-template
33+
:src-dirs ["src"]})
34+
35+
(defn jar [_]
36+
(b/write-pom opts)
37+
(b/copy-dir {:src-dirs ["src" "resources"]
38+
:target-dir class-dir})
39+
(b/jar {:class-dir class-dir
40+
:jar-file jar-file}))
41+
42+
(defn deploy "Deploy the JAR to Clojars." [_]
43+
(println "Deploying to Clojars.")
44+
(dd/deploy {:installer :remote
45+
;:sign-releases? true
46+
:pom-file (b/pom-path (select-keys opts [:lib :class-dir]))
47+
;:artifact "target/tech.ml.dataset.jar"
48+
:artifact (b/resolve-path jar-file)}))

deps.edn

+5-19
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@
3636
}
3737

3838
:aliases
39-
{;https://github.com/applied-science/deps-library
40-
:release
41-
{:extra-deps {applied-science/deps-library {:mvn/version "0.4.0"}}
42-
:main-opts ["-m" "applied-science.deps-library"]}
39+
{; github ci
40+
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.9.6"}
41+
slipset/deps-deploy {:mvn/version "0.2.1"}
42+
babashka/fs {:mvn/version "0.0.5"}}
43+
:ns-default build}
4344

4445
; https://github.com/weavejester/cljfmt
4546
:cljfmt
@@ -57,19 +58,11 @@
5758
"src" "test"
5859
"--config" "cljkondo.edn"]}
5960

60-
:outdated
61-
{:extra-deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}
62-
:main-opts ["-m" "antq.core"]}
63-
6461
:check
6562
{:extra-deps {athos/clj-check {:git/url "https://github.com/athos/clj-check.git"
6663
:sha "518d5a1cbfcd7c952f548e6dbfcb9a4a5faf9062"}}
6764
:main-opts ["-m" "clj-check.check"]}
6865

69-
:garamond
70-
{:main-opts ["-m" "garamond.main"]
71-
:extra-deps {com.workframe/garamond {:mvn/version "0.4.0"}}}
72-
7366
:test
7467
{:extra-paths ["test"
7568
"test/resources"]
@@ -79,10 +72,6 @@
7972
:main-opts ["-m" "cognitect.test-runner"]
8073
:exec-fn cognitect.test-runner.api/test}
8174

82-
:nrepl {:extra-paths ["test/resources"]
83-
:extra-deps {nrepl/nrepl {:mvn/version "0.9.0"}}
84-
:main-opts ["-m" "nrepl.cmdline"]}
85-
8675
:webly {:extra-paths ["test"]
8776
:extra-deps {;org.slf4j/slf4j-nop {:mvn/version "1.7.32"}
8877
org.pinkgorilla/webly {:mvn/version "0.4.623"
@@ -131,9 +120,6 @@
131120
"--config" "[\"webly/config.edn\" ]"
132121
]}
133122

134-
135-
136-
137123
; tree and list are here just because tools.deps.alpha does not work on my machine
138124
:tree {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.14.1178"}}
139125
:exec-fn clojure.tools.cli.api/tree}

release.edn

-3
This file was deleted.

0 commit comments

Comments
 (0)