File: release

package info (click to toggle)
nfoview 2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 592 kB
  • sloc: python: 1,284; makefile: 114; sh: 94
file content (20 lines) | stat: -rwxr-xr-x 608 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
#!/bin/bash
# Commit changes, tag and push release to GitHub.
cd "$(dirname "$0")/.." || exit 1
VERSION="$(python3 -c "import nfoview; print(nfoview.__version__)")"
echo "Git status:"
git status --porcelain
printf "\nRelease version: $VERSION\n"
read -p "Press Enter to continue or Ctrl+C to abort: "
git commit -a -m "RELEASE $VERSION"
git tag -s -m "RELEASE $VERSION" $VERSION
git push
git push --tags
egrep -B 999 -m2 "^===+" NEWS.md \
    | head -n-3 \
    | tail -n+4 \
    | sed ':a;N;$!ba;s/\n  / /g' \
    | gh release create \
         --notes-file - \
         --title $VERSION \
         $VERSION