Debian Codegraph @

tools/release

raw
1 #!/bin/bash
2 # Commit changes, tag and push release to GitHub.
3 cd "$(dirname "$0")/.." || exit 1
4 VERSION="$(python3 -c "import nfoview; print(nfoview.__version__)")"
5 echo "Git status:"
6 git status --porcelain
7 printf "\nRelease version: $VERSION\n"
8 read -p "Press Enter to continue or Ctrl+C to abort: "
9 git commit -a -m "RELEASE $VERSION"
10 git tag -s -m "RELEASE $VERSION" $VERSION
11 git push
12 git push --tags
13 egrep -B 999 -m2 "^===+" NEWS.md \
14 | head -n-3 \
15 | tail -n+4 \
16 | sed ':a;N;$!ba;s/\n / /g' \
17 | gh release create \
18 --notes-file - \
19 --title $VERSION \
20 $VERSION