Skip to content

Commit

Permalink
test & ci: bump deps, tweak pubcheck (#132)
Browse files Browse the repository at this point in the history
* test & ci: bump deps, tweak pubcheck

Of note:
- clojure 1.12 beta2!
- bb `pubcheck` task can now run checks on unpushed branch

* ci test: bump graalvm

* ci nvd scan: bump deps
  • Loading branch information
lread authored Jul 29, 2024
1 parent 4564fab commit 861271d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
- { name: 'graalvm', short-name: 'graal' }
- { name: 'graalvm-community', short-name: 'graalce' }
java-version:
- '22.0.1'
- '22.0.2'
clojure-version: [ '1.11', '1.12' ]

name: ${{matrix.os.name}} ${{matrix.distribution.short-name}} jdk${{matrix.java-version}} clj${{ matrix.clojure-version }}
Expand Down
2 changes: 1 addition & 1 deletion bb.edn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{:paths ["script" "build"]
:deps {lread/status-line {:git/url "https://github.com/lread/status-line.git"
:sha "cf44c15f30ea3867227fa61ceb823e5e942c707f"}
io.github.babashka/neil {:git/tag "v0.3.65" :git/sha "9a79582"}
io.github.babashka/neil {:git/tag "v0.3.67" :git/sha "054ca51"}
version-clj/version-clj {:mvn/version "2.0.2"}}
:tasks {;; setup
:requires ([babashka.fs :as fs]
Expand Down
6 changes: 3 additions & 3 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
:1.9 {:override-deps {org.clojure/clojure {:mvn/version "1.9.0"}}}
:1.10 {:override-deps {org.clojure/clojure {:mvn/version "1.10.3"}}}
:1.11 {:override-deps {org.clojure/clojure {:mvn/version "1.11.3"}}}
:1.12 {:override-deps {org.clojure/clojure {:mvn/version "1.12.0-beta1"}}}
:1.12 {:override-deps {org.clojure/clojure {:mvn/version "1.12.0-beta2"}}}
:test {:extra-paths ["test"]
:extra-deps {io.github.cognitect-labs/test-runner
{:git/tag "v0.5.1" :git/sha "dfb30dd"}}
Expand All @@ -24,15 +24,15 @@
:extra-deps {com.github.clj-easy/graal-build-time {:mvn/version "1.0.5"}}}
:build
{:extra-paths ["build"]
:deps {io.github.clojure/tools.build {:mvn/version "0.10.4"}
:deps {io.github.clojure/tools.build {:mvn/version "0.10.5"}
slipset/deps-deploy {:mvn/version "0.2.2"}
babashka/fs {:mvn/version "0.5.21"}}
:ns-default build}
;; for consistent linting we use a specific version of clj-kondo through the jvm
:clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2024.05.24"}}
:override-deps {org.clojure/clojure {:mvn/version "1.11.3"}}
:main-opts ["-m" "clj-kondo.main"]}
:eastwood {:extra-deps {jonase/eastwood {:mvn/version "1.4.2"}}
:eastwood {:extra-deps {jonase/eastwood {:mvn/version "1.4.3"}}
:main-opts ["-m" "eastwood.lint" {:source-paths ["src/clojure"]
:test-paths ["test"]
:add-linters [:performance]}]}}}
2 changes: 1 addition & 1 deletion nvd_check_helper_project/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
#_:clj-kondo/ignore
{:mvn/version "RELEASE"}
;; temporarily try bumping transitive dep to current release
org.owasp/dependency-check-core {:mvn/version "10.0.2"}}}
org.owasp/dependency-check-core {:mvn/version "10.0.3"}}}
10 changes: 6 additions & 4 deletions script/publish.clj
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@
:out
string/trim
seq))
(defn- local-branch? []
(let [{:keys [exit]} (t/shell {:continue true :out :string :err :out}
"git rev-parse --symbolic-full-name @{u}")]
(not (zero? exit))))

(defn- unpushed-commits? []
(let [{:keys [exit :out]} (t/shell {:continue true :out :string}
"git cherry -v")]
(if (zero? exit)
(-> out string/trim seq)
(status/die 1 "Failed to check for unpushed commits, are you on an unpushed branch?"))))
(and (zero? exit) (-> out string/trim seq))))

(defn- analyze-changelog
"Certainly not fool proof, but should help for common mistakes"
Expand Down Expand Up @@ -87,7 +89,7 @@
{:check "no uncommitted code"
:result (if (uncommitted-code?) :fail :pass)}
{:check "no unpushed commits"
:result (if (unpushed-commits?) :fail :pass)}
:result (if (or (local-branch?) (unpushed-commits?)) :fail :pass)}
{:check "changelog has unreleased section"
:result (if (:section-missing changelog-findings) :fail :pass)}
{:check "changelog unreleased section attributes valid"
Expand Down

0 comments on commit 861271d

Please sign in to comment.