1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-29 03:53:38 +03:00
vimr/bin/create_github_release.sh

42 lines
971 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
set -x
2016-10-18 19:00:15 +03:00
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-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-05 00:24:56 +03:00
GITHUB_TOKEN=$(cat ~/.config/github.qvacua.release.token) github-release release \
--user qvacua \
--repo vimr \
--tag "${TAG}" \
--pre-release \
--name "${COMPOUND_VERSION}" \
--description "${RELEASE_NOTES}"
else
GITHUB_TOKEN=$(cat ~/.config/github.qvacua.release.token) github-release release \
--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"
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}"