1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-28 11:35:35 +03:00
vimr/bin/commit_and_push_appcast.sh

26 lines
571 B
Bash
Raw Normal View History

2016-10-15 10:38:09 +03:00
#!/bin/bash
2016-10-18 19:00:15 +03:00
set -e
2016-10-15 10:38:09 +03:00
BRANCH=$1
COMPOUND_VERSION=$2
2016-10-15 10:47:11 +03:00
IS_SNAPSHOT=$3
UPDATE_SNAPSHOT_APPCAST_FOR_RELEASE=$4
2016-10-15 10:38:09 +03:00
2016-10-15 10:47:11 +03:00
if [ "${IS_SNAPSHOT}" = true ] ; then
2017-11-30 00:59:49 +03:00
cp ./build/Build/Products/Release/appcast_snapshot.xml .
2016-10-15 10:47:11 +03:00
else
2017-11-30 00:59:49 +03:00
cp ./build/Build/Products/Release/appcast.xml .
2016-10-15 10:47:11 +03:00
fi
2016-10-15 10:38:09 +03:00
if [ "${IS_SNAPSHOT}" = false ] && [ "${UPDATE_SNAPSHOT_APPCAST_FOR_RELEASE}" = true ] ; then
cp appcast.xml appcast_snapshot.xml
fi
echo "### Commiting and pushing appcast(s) to ${BRANCH}"
git add appcast*
git commit -S -m "Bump appcast(s) to ${COMPOUND_VERSION}"
git push origin HEAD:"${BRANCH}"