Skip to content

Commit 3758251

Browse files
committed
Bump to v0.6, update docs and use bb as task runner
1 parent 9b0ce9a commit 3758251

File tree

8 files changed

+53
-34
lines changed

8 files changed

+53
-34
lines changed

.tool-versions

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
java temurin-11
2+
clojure latest
3+
babashka latest
4+
clj-kondo latest
5+
cljfmt latest

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ This library is a simple Clojure logging facade that wraps SLF4J 2+ (the version
2727

2828
```clojure
2929
;; tools.deps
30-
com.kroo/epilogue {:mvn/version "0.5"}
30+
com.kroo/epilogue {:mvn/version "0.6"}
3131
;; Leiningen
32-
[com.kroo/epilogue "0.5"]
32+
[com.kroo/epilogue "0.6"]
3333
```
3434

3535
Before you can use Epilogue, you will probably want to first configure all logs to go through SLF4J and then configure a logging backend. You can find an example Clojure project using Epilogue with [Logback][] in the "[examples](/examples/logback)" folder of this repository, which demonstrates how to set it up.

bb.edn

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{:tasks
2+
{:init (do (defn sh [& args]
3+
(binding [*out* *err*]
4+
(apply println "+" args))
5+
(apply shell args))
6+
(def clj (partial sh "clojure")))
7+
check {:doc "Run all pre-commit checks."
8+
:depends [lint fmt test]}
9+
lint {:doc "Lint code."
10+
:task (sh "clj-kondo" "--lint" "src:test")}
11+
fmt {:doc "Format code."
12+
:task (sh "cljfmt" "fix")}
13+
test {:doc "Run test suite."
14+
:task (do
15+
(clj "-T:build" "compile")
16+
(apply clj "-X:test" *command-line-args*))}
17+
build {:doc "Run build functions."
18+
:task (apply clj "-T:build" *command-line-args*)}
19+
outdated {:doc "Check for outdated dependencies."
20+
:task (clj "-T:antq" "outdated")}}}

build/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
# Common development actions
22

3+
> [!TIP]
4+
> Install all external tools automatically with [`asdf`](https://asdf-vm.com/) or [`mise`](https://mise.jdx.dev/). All tool versions are listed in the `.tool-versions` file.
5+
36
## Lint/test/etc.
47

58
```shell
6-
clojure -M:lint # Lint
7-
clojure -T:cljfmt fix # Fix formatting
8-
clojure -T:antq outdated # List outdated deps
9+
bb lint # Lint
10+
bb fmt # Fix formatting
11+
bb outdated # List outdated deps
912
```
1013

11-
<!-- clojure -X:test # Run tests -->
12-
1314
## Build
1415

15-
> **Warning**<br>
16+
> [!WARNING]
1617
> If you have any local changes that haven't been committed, they will be included in the built jar file.
1718
1819
Build and install the jar with these commands.
1920

2021
```shell
21-
clojure -T:build jar
22-
clojure -T:build install
22+
bb build jar
23+
bb build install
2324
```
2425

2526
If there was no Git tag pointing to the commit, the jar will have the version: `local`.

build/deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ pushd "deploy-$version"
2020

2121
(
2222
set -e
23-
clojure -T:build jar
24-
clojure -T:build deploy
23+
bb build jar
24+
bb build deploy
2525
)
2626

2727
popd

deps.edn

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,9 @@
55
{:dev {:extra-deps {org.slf4j/slf4j-simple {:mvn/version "2.0.16"}}}
66
;; clj -T:build ...
77
:build {:extra-paths ["build"]
8-
:deps {io.github.clojure/tools.build
9-
{:git/tag "v0.10.5", :git/sha "2a21b7a"}
8+
:deps {io.github.clojure/tools.build {:git/tag "v0.10.5", :git/sha "2a21b7a"}
109
slipset/deps-deploy {:mvn/version "0.2.2"}}
1110
:ns-default build}
12-
;; clj -M:lint
13-
:lint {:replace-deps {clj-kondo/clj-kondo {:mvn/version "RELEASE"}}
14-
:main-opts ["-m" "clj-kondo.main" "--parallel" "--lint" "src"]}
15-
;; clj -T:cljfmt fix
16-
:cljfmt {:deps {io.github.weavejester/cljfmt {:git/tag "0.13.0", :git/sha "f0230c3"}}
17-
:ns-default cljfmt.tool}
1811
;; clj -T:antq outdated
1912
:antq {:deps {com.github.liquidz/antq {:mvn/version "RELEASE"}
2013
org.slf4j/slf4j-nop {:mvn/version "RELEASE"}}

examples/logback/deps.edn

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{:paths ["src" "resources"]
2-
:deps {org.clojure/clojure {:mvn/version "1.11.2"}
3-
com.kroo/epilogue {:mvn/version "0.5"}
2+
:deps {org.clojure/clojure {:mvn/version "1.12.0"}
3+
com.kroo/epilogue {:mvn/version "0.6"}
44
;; Use Logback-classic as the logging backend.
5-
ch.qos.logback/logback-classic {:mvn/version "1.5.3"}
6-
com.kroo/typeset.logback {:mvn/version "0.4"}
5+
ch.qos.logback/logback-classic {:mvn/version "1.5.11"}
6+
com.kroo/typeset.logback {:mvn/version "0.7"}
77
;; Add SLF4J logging bridges to make logs from other logging libraries go via SLF4J.
8-
org.slf4j/jul-to-slf4j {:mvn/version "2.0.12"}
9-
org.slf4j/jcl-over-slf4j {:mvn/version "2.0.12"}
10-
org.slf4j/log4j-over-slf4j {:mvn/version "2.0.12"}}}
8+
org.slf4j/jul-to-slf4j {:mvn/version "2.0.16"}
9+
org.slf4j/jcl-over-slf4j {:mvn/version "2.0.16"}
10+
org.slf4j/log4j-over-slf4j {:mvn/version "2.0.16"}}}

examples/logback/project.clj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
(defproject com.example/logging "1.0"
2-
:dependencies [[org.clojure/clojure "1.11.2"]
3-
[com.kroo/epilogue "0.5"]
2+
:dependencies [[org.clojure/clojure "1.12.0"]
3+
[com.kroo/epilogue "0.6"]
44
;; Use Logback-classic as the logging backend.
5-
[ch.qos.logback/logback-classic "1.5.3"]
6-
[com.kroo/typeset.logback "0.4"]
5+
[ch.qos.logback/logback-classic "1.5.11"]
6+
[com.kroo/typeset.logback "0.7"]
77
;; Add SLF4J logging bridges to make logs from other logging libraries go via SLF4J.
8-
[org.slf4j/jul-to-slf4j "2.0.12"]
9-
[org.slf4j/jcl-over-slf4j "2.0.12"]
10-
[org.slf4j/log4j-over-slf4j "2.0.12"]]
8+
[org.slf4j/jul-to-slf4j "2.0.16"]
9+
[org.slf4j/jcl-over-slf4j "2.0.16"]
10+
[org.slf4j/log4j-over-slf4j "2.0.16"]]
1111
;; Make clojure.tools.logging use SLF4J.
1212
:jvm-opts ["-Dclojure.tools.logging.factory=clojure.tools.logging.impl/slf4j-factory"])

0 commit comments

Comments
 (0)