Restrict release to stable branch

This commit is contained in:
Davide De Rosa 2021-10-06 13:13:36 +02:00
parent 59f0bd5c32
commit f63b679349
1 changed files with 3 additions and 3 deletions

View File

@ -1,12 +1,12 @@
#!/bin/sh
CURRENT_BRANCH=`git branch --show-current`
if [[ $CURRENT_BRANCH != "master" ]]; then
echo "Not on master branch"
if [[ $CURRENT_BRANCH != "stable" ]]; then
echo "Not on stable branch"
exit
fi
VERSION=`ci/version-number.sh`
DATE=`date "+%Y-%m-%d"`
CHANGELOG_GLOB="Passepartout/App/*/CHANGELOG.md"
sed -i '' -E "s/^.*Beta.*$/## $VERSION ($DATE)/g" $CHANGELOG_GLOB
sed -i '' -E "s/^.*Beta.*$/## $VERSION ($DATE)/" $CHANGELOG_GLOB
git commit -am "Release" && git tag -as "v$VERSION"