Skip to content

Commit

Permalink
build updated
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Apr 4, 2024
1 parent afc1391 commit d2ef623
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 31 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: ./scripts/test-cljs.sh
- name: copy res
run: |
./scripts/npm_install.sh
clojure -X:goldly :profile '"npm-install"'
./scripts/copy_res.sh
#- name: show git tag
# run: clojure -M:garamond
Expand All @@ -55,18 +55,5 @@ jobs:
git config --global user.email "ci@pinkgorilla.org"
git config --global user.name "CI/CD"
rm src/goldly_bindings_generated.cljs
clojure -M:release --patch
git push --tags
# rm src/goldly_bindings_generated.cljs
# clojure -M:release tag --minor
# clojure -M:release pom
# clojure -M:release jar
# clojure -M:release deploy
# lein release
# bash <(curl -s https://codecov.io/bash)
# lein with-profile +relay-jetty cloverage
# bash <(curl -s https://codecov.io/bash) -f target/coverage/codecov.json
#
# Could not transfer metadata foo:bar/maven-metadata.xml from/to releases (https://clojars.org/repo): Read timed out
# Default 10000 not enough for us
# export LEIN_JVM_OPTS="-Dmaven.wagon.rto=90000"
clojure -T:build jar
clojure -T:build deploy
52 changes: 52 additions & 0 deletions build.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
(ns build
(:require
[babashka.fs :as fs]
[clojure.tools.build.api :as b]
[deps-deploy.deps-deploy :as dd]))

(def lib 'org.pinkgorilla/ui-vega)
(def version (format "0.1.%s" (b/git-count-revs nil)))
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file (format "target/%s-%s.jar" (name lib) version))

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


(def pom-template
[[:licenses
[:license
[:name "Eclipse Public License"]
[:url "https://www.eclipse.org/legal/epl-v10.html"]]]
[:developers
[:developer
[:name "pink-gorilla"]]]
[:scm
[:url "https://github.com/pink-gorilla/ui-vega/"]
[:connection "scm:git:git://github.com/pink-gorilla/ui-vega.git"]
[:developerConnection "scm:git:ssh://git@github.com/pink-gorilla/ui-vega.git"]]])

(def opts {:class-dir class-dir
:lib lib
:version version
:basis basis
:pom-data pom-template
:src-dirs ["src"]})

(defn jar [_]
(b/write-pom opts)
(b/copy-dir {:src-dirs ["src"
"resources"
"target/node_modules"]
:target-dir class-dir})
(b/jar {:class-dir class-dir
:jar-file jar-file}))

(defn deploy "Deploy the JAR to Clojars." [_]
(println "Deploying to Clojars..")
(dd/deploy {:installer :remote
;:sign-releases? true
:pom-file (b/pom-path (select-keys opts [:lib :class-dir]))
;:artifact "target/tech.ml.dataset.jar"
:artifact (b/resolve-path jar-file)}))
18 changes: 6 additions & 12 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
org.pinkgorilla/pinkie {:mvn/version "0.5.231"}} ; box

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

; https://github.com/weavejester/cljfmt
:cljfmt
Expand All @@ -29,19 +30,12 @@
"--lint" "src"
"--config" "cljkondo.edn"]}

:outdated
{:extra-deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}
:main-opts ["-m" "antq.core"]}

:check
{:extra-deps {athos/clj-check {:git/url "https://github.com/athos/clj-check.git"
:sha "518d5a1cbfcd7c952f548e6dbfcb9a4a5faf9062"}}
:main-opts ["-m" "clj-check.check"]}

:garamond
{:main-opts ["-m" "garamond.main"]
:extra-deps {com.workframe/garamond {:mvn/version "0.4.0"}}}

:test
{:extra-paths ["test"]
:extra-deps {io.github.cognitect-labs/test-runner
Expand Down Expand Up @@ -87,7 +81,7 @@
:services "goldly/docs-services.edn"}}

; BUILD BUNDLE (then exit)
:build
:gbuild
{:exec-fn goldly.app.build/goldly-build
:exec-args {:profile "compile2"}}

Expand Down
3 changes: 0 additions & 3 deletions release.edn

This file was deleted.

0 comments on commit d2ef623

Please sign in to comment.