mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
Include release scripts
This commit is contained in:
parent
aa91af32a5
commit
efaf76e9ab
4 changed files with 84 additions and 0 deletions
25
contrib/increment-version
Executable file
25
contrib/increment-version
Executable file
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ "$#" -ne 1 ]; then
|
||||||
|
echo "usage: $0 <new-version>" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
new_version="$1"
|
||||||
|
|
||||||
|
if [ "$new_version" != "${new_version#v}" ]; then
|
||||||
|
echo "Error: The new version shouldn't be prefixed with a \"v\"." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
sed -i meson.build -e "s/^ version: '.*'/ version: '$new_version'/"
|
||||||
|
|
||||||
|
echo -n "Minimum wlroots version? "
|
||||||
|
read -r wlr_version_min
|
||||||
|
|
||||||
|
sed -i meson.build -e "s/'wlroots', version: '.*'/'wlroots', version: '>= $wlr_version_min'/"
|
||||||
|
|
||||||
|
git add meson.build
|
||||||
|
git commit -m "Update version to $new_version"
|
||||||
21
contrib/release
Executable file
21
contrib/release
Executable file
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ "$#" -ne 1 ]; then
|
||||||
|
echo "usage: $0 <new-version>" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
new_version="$1"
|
||||||
|
|
||||||
|
if [ "$new_version" != "${new_version#v}" ]; then
|
||||||
|
echo "Error: The new version shouldn't be prefixed with a \"v\"." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
./increment_version "$new_version"
|
||||||
|
./tag-release "$new_version"
|
||||||
|
./sign-release
|
||||||
|
|
||||||
|
git push --tags
|
||||||
12
contrib/sign-release
Executable file
12
contrib/sign-release
Executable file
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
project="$(basename "$(pwd)")"
|
||||||
|
last=$(git describe --tags --abbrev=0)
|
||||||
|
|
||||||
|
prefix="$project-${last#v}"
|
||||||
|
archive="$prefix.tar.gz"
|
||||||
|
|
||||||
|
git archive --prefix="$prefix/" -o "$archive" "$last"
|
||||||
|
gpg --output "$archive".sig --detach-sig "$archive"
|
||||||
26
contrib/tag-release
Executable file
26
contrib/tag-release
Executable file
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
if [ "$#" -ne 1 ]; then
|
||||||
|
echo "usage: $0 <new-version>" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
last=$(git describe --tags --abbrev=0)
|
||||||
|
echo "Last release was $last"
|
||||||
|
|
||||||
|
next="v$1"
|
||||||
|
|
||||||
|
shortlog="$(git shortlog --no-merges "$last"..)"
|
||||||
|
|
||||||
|
printf "Shortlog: \n\n%s\n\nRelease $next? [y/N] " "$shortlog"
|
||||||
|
read -r answer
|
||||||
|
|
||||||
|
if [ "$answer" != "y" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
project="$(basename "$(pwd)")"
|
||||||
|
|
||||||
|
(echo "$project $next"; echo ""; echo "$shortlog") | git tag "$next" -ase -F -
|
||||||
Loading…
Add table
Add a link
Reference in a new issue