Skip to content

Commit

Permalink
Merge pull request #1250 from twm/release-pt-3
Browse files Browse the repository at this point in the history
GHA release pipeline, pt. 3
  • Loading branch information
twm authored Dec 9, 2024
2 parents 41754cb + a0de4cb commit 8126eb1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ Yarrharr is running at [http://127.0.0.1:8888/](http://127.0.0.1:8888/).

## Releasing Yarrharr

1. Set the version: ``incremental update yarrharr --newversion YYYY.MM.PP``
2. Tag the release: ``just release``
1. Set the version: ``incremental update yarrharr --newversion YYYY.MM.P``
2. Commit, per tradition: ``git commit -am "Anoint YYYY.MM.P"``
3. Tag the release: ``just release``

## License

Expand Down
16 changes: 13 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2022, 2023 Tom Most <[email protected]>; GPLv3+
# Copyright 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2022, 2023, 2024 Tom Most <[email protected]>; GPLv3+

set shell := ["bash", "-euc"]

Expand All @@ -10,9 +10,19 @@ _static:

# Tag a release and trigger the GHA release workflow
release:
#!/bin/bash
set -exu -o pipefail
git diff --quiet HEAD || exit 1
[[ $(git rev-parse --abbrev-ref HEAD) == trunk ]]
if [[ $(git rev-parse --abbrev-ref HEAD) != trunk ]]
then
echo "ERROR: Must be on trunk branch"
exit 1
fi
if ! git diff --quiet HEAD
then
echo "ERROR: Dirty working copy"
exit 1
fi
tox -e release --notest --recreate
version=$(.tox/release/bin/hatch version)
tag="v${version}"
git tag "$tag"
Expand Down

0 comments on commit 8126eb1

Please sign in to comment.