Move/adapt archive and release script to repo root

This commit is contained in:
Johannes Marbach 2024-03-22 20:50:40 +01:00
parent d9cb372c5c
commit 4f00ff228d
3 changed files with 17 additions and 3 deletions

28
release.sh Executable file
View file

@ -0,0 +1,28 @@
#!/bin/bash
if [[ -z "$1" ]]; then
echo "Error: No version number provided"
exit 1
fi
if [[ -z "$2" ]]; then
echo "Error: No GitLab API token provided"
exit 1
fi
if ! grep "## $1" CHANGELOG.md > /dev/null; then
echo "Error: No entry in CHANGELOG.md for version $1"
exit 1
fi
if ! grep -E "^\s*version:\s*'$1'" meson.build > /dev/null; then
echo "Error: Version $1 differs from version in meson.build"
exit 1
fi
git tag "$1"
git push --tags
./archive.sh "$2"
echo "Now create a release for https://gitlab.com/postmarketOS/buffybox/-/tags/$1 and attach the uploaded archive"