File: release.sh

package info (click to toggle)
pyhamcrest 2.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 844 kB
  • sloc: python: 4,081; makefile: 114; sh: 15
file content (22 lines) | stat: -rwxr-xr-x 444 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
set -eu -o pipefail
HERE="$(
    unset CDPATH
    cd "$(dirname "$0")"
    pwd
)"
cd "$HERE"

HATCH_CURRENT=$(hatch version)
TAG=${1:?"a tag must be provided. Consider using hatch's next: V$HATCH_CURRENT"}

# towncrier needs the version to be tagged before running
git tag "$TAG"

# generate the changelog
hatch run towncrier build --yes

# re-tag
git tag -f "$TAG"

echo "To release, run 'git push origin --tags \"$TAG\"'"