1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-25 06:06:21 +03:00
vimr/bin/create_github_release.sh

49 lines
1.1 KiB
Bash
Raw Normal View History

2016-10-14 15:26:14 +03:00
#!/bin/bash
2016-10-18 19:00:15 +03:00
set -e
2016-11-09 23:50:03 +03:00
TOKEN=$(cat ~/.config/github.qvacua.release.token)
2016-10-14 15:26:14 +03:00
COMPOUND_VERSION=$1
2016-10-15 01:30:03 +03:00
TAG=$2
VIMR_FILE_NAME=$3
RELEASE_NOTES=$4
2016-10-24 23:28:48 +03:00
IS_SNAPSHOT=$5
2016-10-14 15:26:14 +03:00
2016-11-10 17:43:40 +03:00
echo "COMPOUND_VERSION: ${COMPOUND_VERSION}"
echo "TAG: ${TAG}"
echo "VIMR_FILE_NAME: ${VIMR_FILE_NAME}"
echo "RELEASE_NOTES: ${RELEASE_NOTES}"
echo "IS_SNAPSHOT: ${IS_SNAPSHOT}"
2016-10-14 15:26:14 +03:00
pushd build/Release
tar cjf ${VIMR_FILE_NAME} VimR.app
2016-11-05 00:24:56 +03:00
echo "### Creating release"
2016-10-24 23:28:48 +03:00
if [ "${IS_SNAPSHOT}" = true ] ; then
2016-11-09 23:50:03 +03:00
GITHUB_TOKEN="${TOKEN}" github-release release \
2016-11-05 00:24:56 +03:00
--user qvacua \
--repo vimr \
--tag "${TAG}" \
--pre-release \
--name "${COMPOUND_VERSION}" \
--description "${RELEASE_NOTES}"
else
2016-11-09 23:50:03 +03:00
GITHUB_TOKEN="${TOKEN}" github-release release \
2016-11-05 00:24:56 +03:00
--user qvacua \
--repo vimr \
--tag "${TAG}" \
--name "${COMPOUND_VERSION}" \
--description "${RELEASE_NOTES}"
2016-10-24 23:28:48 +03:00
fi
2016-10-14 15:26:14 +03:00
echo "### Uploading build"
2016-11-09 23:50:03 +03:00
GITHUB_TOKEN="${TOKEN}" github-release upload \
2016-10-14 15:26:14 +03:00
--user qvacua \
--repo vimr \
2016-10-15 01:30:03 +03:00
--tag "${TAG}" \
2016-10-14 15:26:14 +03:00
--name "${VIMR_FILE_NAME}" \
--file "${VIMR_FILE_NAME}"