File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33set -o pipefail
44
55readonly VERSION=" ${1:- $(date +% Y.% -m.% -d)} "
6- readonly IS_JUJUTSU=" $( if jj root & > /dev/null; then echo 1; else echo 0; fi) "
76
8- cd " $( git rev-parse --show-toplevel ) "
7+ cd " $( jj root ) "
98
10- if [ " ${IS_JUJUTSU} " -eq 1 ]
9+ if jj show --stat | tail -n -1 | grep -q ' ^0 files changed '
1110then
12- if jj show --stat | tail -n -1 | grep -q ' ^0 files changed'
13- then
14- jj describe -m " chore: version ${VERSION} "
15- else
16- jj new -m " chore: version ${VERSION} "
17- fi
11+ jj describe -m " chore: version ${VERSION} "
12+ else
13+ jj new -m " chore: version ${VERSION} "
1814fi
1915
2016cargo set-version " ${VERSION} "
@@ -23,32 +19,14 @@ cargo upgrade
2319cargo update
2420
2521cargo check
26- cargo test --bins
27-
28- RUST_LOG=warn cargo run -- list-systemd-options | head -n -1 > systemd_options.md
29-
30- if [ " ${IS_JUJUTSU} " -eq 0 ]
31- then
32- git add Cargo.{toml,lock} systemd_options.md
22+ cargo test
3323
34- git commit -m " chore: version ${VERSION} "
35- fi
36-
37- if [ " ${IS_JUJUTSU} " -eq 1 ]
38- then
39- jj new
40- fi
24+ jj new
4125
4226git tag -f -m " Version ${VERSION} " " v${VERSION} "
4327git cliff | head -n -3 > CHANGELOG.md
4428git tag -d " v${VERSION} "
4529
46- if [ " ${IS_JUJUTSU} " -eq 1 ]
47- then
48- jj squash -u
49- else
50- git add CHANGELOG.md
51- git commit --amend --no-edit
52- fi
30+ jj squash -u
5331
5432git tag -f -m " Version ${VERSION} " " v${VERSION} "
You can’t perform that action at this time.
0 commit comments