-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbb.edn
More file actions
48 lines (37 loc) · 2.89 KB
/
Copy pathbb.edn
File metadata and controls
48 lines (37 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{:paths ["scripts"]
:deps {com.lambdaisland/launchpad {:mvn/version "0.45.201-alpha"}}
:tasks {dev {:doc "Start the dev environment: Postgres + nREPL on 7899. See bin/launchpad."
:task (shell "bin/launchpad")}
db:up {:doc "Start the dev Postgres in the background."
:task (shell "docker compose up -d")}
db:down {:doc "Stop the dev Postgres, keeping its data."
:task (shell "docker compose down")}
db:reset {:doc "Wipe the dev Postgres and recreate it from docker/init-db.dev.sql."
:task (do (shell "docker compose down -v")
(shell "docker compose up -d"))}
db:psql {:doc "Open a psql shell on the dev database."
:task (shell "docker compose exec postgres psql -U dbos -d dbos_clj_dev")}
lint {:doc "Linting project's code. lint-fixtures/ is excluded on purpose — it is the fixture for the exported step linters and is meant to fail (see test/dbos/kondo_test.clj)."
:task (shell "clj-kondo" "--parallel" "--lint" "src" "test" "dev" "example")}
test {:doc "Run the tests. Needs the dev Postgres (`bb dev` or `bb db:up`). Extra args go to kaocha."
:task (apply shell "bin/kaocha" *command-line-args*)}
build {:doc "Build the library jar into target/ (version from the latest v* git tag)."
:task (shell "clojure -T:build build")}
tag {:doc "Prepare and publish a release: promote the changelog's Unreleased section, bump the README, then commit, tag and push. Usage: bb tag 0.3.0"
:requires ([make])
:task (apply make/tag *command-line-args*)}
changelog-entry {:doc "Print one release's changelog section, for GitHub release notes. Defaults to the latest tag."
:requires ([make])
:task (apply make/changelog-entry *command-line-args*)}
release {:doc "Build and deploy the library to Clojars. Reads the deploy token from 1Password, so `op` must be installed and signed in."
:requires ([make])
:task (shell {:extra-env
{"CLOJARS_USERNAME" "ovistoica"
"CLOJARS_PASSWORD" (make/op-read "op://Personal/Clojars Token/credential")}}
"clojure -T:build release")}
;; resources/ carries the exported clj-kondo hook, lint-fixtures/ the
;; lint fixture — both are real Clojure and worth keeping formatted.
format:check {:doc "Check code formatting with cljfmt"
:task (shell "cljfmt" "check" "src" "test" "dev" "example" "resources" "lint-fixtures")}
format:project {:doc "Run cljfmt formatting on the entire codebase"
:task (shell "cljfmt" "fix" "src" "test" "dev" "example" "resources" "lint-fixtures")}}}