Roll back release on git errors
This commit is contained in:
parent
d629540c18
commit
9ca015e42f
|
@ -10,4 +10,15 @@ DATE=`date "+%Y-%m-%d"`
|
|||
CHANGELOG_GLOB="Passepartout/App/*/CHANGELOG.md"
|
||||
MESSAGE="Release"
|
||||
sed -i '' -E "s/^.*Beta.*$/## $VERSION ($DATE)/" $CHANGELOG_GLOB
|
||||
git commit -am $MESSAGE && git tag -as "v$VERSION" -m $MESSAGE
|
||||
|
||||
if ! git commit -am $MESSAGE; then
|
||||
echo "Failed to commit release"
|
||||
git reset --hard
|
||||
exit
|
||||
fi
|
||||
|
||||
if ! git tag -as "v$VERSION" -m $MESSAGE; then
|
||||
echo "Failed to tag release"
|
||||
git reset --hard HEAD^
|
||||
exit
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue