Fix release script
This commit is contained in:
parent
c8f351934c
commit
bc31e99082
|
@ -1,23 +1,24 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
CURRENT_BRANCH=`git branch --show-current`
|
CURRENT_BRANCH=`git branch --show-current`
|
||||||
if [[ $CURRENT_BRANCH != "stable" ]]; then
|
if [[ $CURRENT_BRANCH != "master" ]]; then
|
||||||
echo "Not on stable branch"
|
echo "Not on master branch"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VERSION=`ci/version-number.sh`
|
VERSION=`ci/version-number.sh ios`
|
||||||
DATE=`date "+%Y-%m-%d"`
|
DATE=`date "+%Y-%m-%d"`
|
||||||
CHANGELOG_GLOB="Passepartout/App/*/CHANGELOG.md"
|
CHANGELOG_GLOB="Passepartout/App/*/CHANGELOG.md"
|
||||||
MESSAGE="Release"
|
COMMIT_MESSAGE="Set release date"
|
||||||
|
TAG_MESSAGE="Release"
|
||||||
sed -i '' -E "s/^.*Beta.*$/## $VERSION ($DATE)/" $CHANGELOG_GLOB
|
sed -i '' -E "s/^.*Beta.*$/## $VERSION ($DATE)/" $CHANGELOG_GLOB
|
||||||
|
|
||||||
if ! git commit -am $MESSAGE; then
|
if ! git commit -am "$COMMIT_MESSAGE"; then
|
||||||
echo "Failed to commit release"
|
echo "Failed to commit release"
|
||||||
git reset --hard
|
git reset --hard
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! git tag -as "v$VERSION" -m $MESSAGE; then
|
if ! git tag -as "v$VERSION" -m "$TAG_MESSAGE"; then
|
||||||
echo "Failed to tag release"
|
echo "Failed to tag release"
|
||||||
git reset --hard HEAD^
|
git reset --hard HEAD^
|
||||||
exit
|
exit
|
||||||
|
|
Loading…
Reference in New Issue