mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
Add release script
This is useful to speed up the release process and avoid making mistakes.
This commit is contained in:
parent
aaf82ee332
commit
108d94f798
1 changed files with 32 additions and 0 deletions
32
release.sh
Executable file
32
release.sh
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh -eu
|
||||
|
||||
prev=$(git describe --tags --abbrev=0)
|
||||
next=$(meson rewrite kwargs info project / | jq -r '.kwargs["project#/"].version')
|
||||
|
||||
case "$next" in
|
||||
*-dev)
|
||||
echo "This is a development version"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$prev" = "$next" ]; then
|
||||
echo "Version not bumped in meson.build"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! git diff-index --quiet HEAD -- meson.build; then
|
||||
echo "meson.build not committed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
shortlog="$(git shortlog --no-merges "$prev..")"
|
||||
(echo "wlroots $next"; echo ""; echo "$shortlog") | git tag "$next" -ase -F -
|
||||
|
||||
prefix=wlroots-$next
|
||||
archive=$prefix.tar.gz
|
||||
git archive --prefix="$prefix/" -o "$archive" "$next"
|
||||
gpg --output "$archive".sig --detach-sig "$archive"
|
||||
|
||||
git push --follow-tags
|
||||
glab release create "$next" "$archive" "$archive.sig" --notes ""
|
||||
Loading…
Add table
Add a link
Reference in a new issue