Skip to content

Commit

Permalink
test & ci: bump deps, tweak pubcheck (#301)
Browse files Browse the repository at this point in the history
Of note:
- clojure 1.12 beta2!
- bb `pubcheck` task can now run checks on unpushed branch
  • Loading branch information
lread authored Jul 29, 2024
1 parent 282f3fe commit 1d15fdd
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 48 deletions.
4 changes: 2 additions & 2 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
:1.11 {:override-deps {org.clojure/clojure {:mvn/version "1.11.3"}}}

;; Clojure pre-release to test against
: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"}}}

;;
;; ClojureScript version we test with (and support)
Expand All @@ -31,7 +31,7 @@
;;
:nrepl
{:extra-deps {nrepl/nrepl {:mvn/version "1.2.0"}
cider/cider-nrepl {:mvn/version "0.49.1"}}
cider/cider-nrepl {:mvn/version "0.49.2"}}
:jvm-opts ["-XX:-OmitStackTraceInFastThrow"]}

:nrepl/jvm
Expand Down
83 changes: 43 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "rewrite-clj",
"devDependencies": {
"karma": "^6.4.3",
"karma": "^6.4.4",
"karma-chrome-launcher": "^3.2.0",
"karma-cljs-test": "^0.1.0",
"karma-junit-reporter": "^2.0.0",
"karma-spec-reporter": "^0.0.36",
"shadow-cljs": "^2.28.10"
"shadow-cljs": "^2.28.11"
}
}
11 changes: 7 additions & 4 deletions script/publish.clj
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,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- commit-matches-default-head? []
(let [repo-head-sha (-> (t/shell {:out :string} (format "git ls-remote https://github.com/%s.git main" (build-shared/lib-github-coords)))
Expand Down Expand Up @@ -106,7 +109,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 "in synch with project repo HEAD"
:result (if (commit-matches-default-head?) :pass :fail)}
{:check "changelog has unreleased section"
Expand Down

0 comments on commit 1d15fdd

Please sign in to comment.