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
|
2017-06-28 18:21:36 +03:00
|
|
|
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
|
|
|
|
2017-06-28 18:21:36 +03:00
|
|
|
if [ "${IS_SNAPSHOT}" = false ] && [ "${UPDATE_SNAPSHOT_APPCAST_FOR_RELEASE}" = true ] ; then
|
2017-06-22 00:15:15 +03:00
|
|
|
cp appcast.xml appcast_snapshot.xml
|
|
|
|
fi
|
2017-08-13 09:21:43 +03:00
|
|
|
|
|
|
|
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}"
|
|
|
|
|