1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-28 19:47:41 +03:00
vimr/bin/create_github_release.sh

35 lines
734 B
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-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
pushd build/Release
tar cjf ${VIMR_FILE_NAME} VimR.app
2016-10-24 23:28:48 +03:00
PRERELEASE=""
if [ "${IS_SNAPSHOT}" = true ] ; then
PRERELEASE="--pre-release"
fi
2016-10-14 15:26:14 +03:00
echo "### Creating release"
GITHUB_TOKEN=$(cat ~/.config/github.qvacua.release.token) github-release release \
--user qvacua \
--repo vimr \
2016-10-15 01:30:03 +03:00
--tag "${TAG}" \
2016-11-04 23:31:09 +03:00
--name "${COMPOUND_VERSION}" "${PRERELEASE}" \
--description "${RELEASE_NOTES}"
2016-10-14 15:26:14 +03:00
echo "### Uploading build"
GITHUB_TOKEN=$(cat ~/.config/github.qvacua.release.token) github-release upload \
--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}"