Skip to content

Commit 1d15fdd

Browse files
authored
test & ci: bump deps, tweak pubcheck (#301)
Of note: - clojure 1.12 beta2! - bb `pubcheck` task can now run checks on unpushed branch
1 parent 282f3fe commit 1d15fdd

File tree

4 files changed

+54
-48
lines changed

4 files changed

+54
-48
lines changed

deps.edn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
:1.11 {:override-deps {org.clojure/clojure {:mvn/version "1.11.3"}}}
2020

2121
;; Clojure pre-release to test against
22-
:1.12 {:override-deps {org.clojure/clojure {:mvn/version "1.12.0-beta1"}}}
22+
:1.12 {:override-deps {org.clojure/clojure {:mvn/version "1.12.0-beta2"}}}
2323

2424
;;
2525
;; ClojureScript version we test with (and support)
@@ -31,7 +31,7 @@
3131
;;
3232
:nrepl
3333
{:extra-deps {nrepl/nrepl {:mvn/version "1.2.0"}
34-
cider/cider-nrepl {:mvn/version "0.49.1"}}
34+
cider/cider-nrepl {:mvn/version "0.49.2"}}
3535
:jvm-opts ["-XX:-OmitStackTraceInFastThrow"]}
3636

3737
:nrepl/jvm

package-lock.json

Lines changed: 43 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "rewrite-clj",
33
"devDependencies": {
4-
"karma": "^6.4.3",
4+
"karma": "^6.4.4",
55
"karma-chrome-launcher": "^3.2.0",
66
"karma-cljs-test": "^0.1.0",
77
"karma-junit-reporter": "^2.0.0",
88
"karma-spec-reporter": "^0.0.36",
9-
"shadow-cljs": "^2.28.10"
9+
"shadow-cljs": "^2.28.11"
1010
}
1111
}

script/publish.clj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,15 @@
6060
string/trim
6161
seq))
6262

63+
(defn- local-branch? []
64+
(let [{:keys [exit]} (t/shell {:continue true :out :string :err :out}
65+
"git rev-parse --symbolic-full-name @{u}")]
66+
(not (zero? exit))))
67+
6368
(defn- unpushed-commits? []
6469
(let [{:keys [exit :out]} (t/shell {:continue true :out :string}
6570
"git cherry -v")]
66-
(if (zero? exit)
67-
(-> out string/trim seq)
68-
(status/die 1 "Failed to check for unpushed commits, are you on an unpushed branch?"))))
71+
(and (zero? exit) (-> out string/trim seq))))
6972

7073
(defn- commit-matches-default-head? []
7174
(let [repo-head-sha (-> (t/shell {:out :string} (format "git ls-remote https://github.com/%s.git main" (build-shared/lib-github-coords)))
@@ -106,7 +109,7 @@
106109
{:check "no uncommitted code"
107110
:result (if (uncommitted-code?) :fail :pass)}
108111
{:check "no unpushed commits"
109-
:result (if (unpushed-commits?) :fail :pass)}
112+
:result (if (or (local-branch?) (unpushed-commits?)) :fail :pass)}
110113
{:check "in synch with project repo HEAD"
111114
:result (if (commit-matches-default-head?) :pass :fail)}
112115
{:check "changelog has unreleased section"

0 commit comments

Comments
 (0)