Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test & ci: bump deps, tweak pubcheck #79

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bb.edn
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
:task publish/-main}
neil ;; let's not rely on a random version of neil
{:doc "Pinned version of babashka/neil (used in scripting)"
:extra-deps {io.github.babashka/neil {:git/tag "v0.3.65" :git/sha "9a79582"}}
:extra-deps {io.github.babashka/neil {:git/tag "v0.3.67" :git/sha "054ca51"}}
:task babashka.neil/-main}
;; hidden tasks, no need for folks to be trying these ci invoked tasks
-ci-clojars-deploy
Expand Down
6 changes: 3 additions & 3 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
: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"}}}
: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"}}
:ns-default build}
:http-server ;; used for to support integration tests
Expand All @@ -35,7 +35,7 @@
: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"]}
:outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.8.1201"}
:outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.8.1206"}
org.clojure/clojure {:mvn/version "1.11.3"}
org.slf4j/slf4j-simple {:mvn/version "2.0.13"} ;; to rid ourselves of logger warnings
}
Expand Down
11 changes: 7 additions & 4 deletions script/publish.clj
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,15 @@
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 +90,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