From 0bed6504b26b043aae6e7782f670b4b83db351f4 Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Fri, 14 Oct 2016 14:26:14 +0200 Subject: [PATCH] Temp --- bin/build.sh | 20 ++++++++------------ bin/commit_and_push_tags.sh | 4 ++-- bin/create_github_release.sh | 27 +++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 14 deletions(-) create mode 100644 bin/create_github_release.sh diff --git a/bin/build.sh b/bin/build.sh index 395b80a4..244ee5f2 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -1,13 +1,16 @@ #!/bin/bash +# For jenkins + set -e export PATH=/usr/local/bin:$PATH # # parameters -BRANCH=$1 -IS_SNAPSHOT=$2 -MARKETING_VERSION=$3 +# - BRANCH +# - IS_SNAPSHOT +# - MARKETING_VERSION +# - RELEASE_NOTES ./bin/prepare_repositories.sh ./bin/clean_old_builds.sh @@ -21,13 +24,6 @@ if [ ${IS_SNAPSHOT} = true ] ; then COMPOUND_VERSION="v${MARKETING_VERSION}-${BUNDLE_VERSION}" fi -#./bin/commit_and_push_tags.sh "${BRANCH}" "${COMPOUND_VERSION}" +./bin/commit_and_push_tags.sh "${BRANCH}" "${COMPOUND_VERSION}" -exit 0 - -pushd build/Release - -VIMR_FILE_NAME="VimR-${COMPOUND_VERSION}.tar.bz2" -tar cjf "${VIMR_FILE_NAME}" VimR.app - -popd +./bin/create_github_release.sh "${COMPOUND_VERSION}" "${RELEASE_NOTES}" diff --git a/bin/commit_and_push_tags.sh b/bin/commit_and_push_tags.sh index 0f06b777..f0503dab 100755 --- a/bin/commit_and_push_tags.sh +++ b/bin/commit_and_push_tags.sh @@ -16,9 +16,9 @@ echo git push origin "${COMPOUND_VERSION}" pushd neovim echo "### Tagging neovim" -git tag -a -m "${COMPOUND_VERSION}" "${COMPOUND_VERSION}" +git tag -a -m "vimr/${COMPOUND_VERSION}" "vimr/${COMPOUND_VERSION}" echo "### Pushing tag to neovim repository" -echo git push origin "${COMPOUND_VERSION}" +echo git push origin "vimr/${COMPOUND_VERSION}" popd neovim diff --git a/bin/create_github_release.sh b/bin/create_github_release.sh new file mode 100644 index 00000000..263e5c76 --- /dev/null +++ b/bin/create_github_release.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +COMPOUND_VERSION=$1 +RELEASE_NOTES=$2 + +VIMR_FILE_NAME="VimR-${COMPOUND_VERSION}.tar.bz2" + +pushd build/Release + +tar cjf ${VIMR_FILE_NAME} VimR.app + +echo "### Creating release" +GITHUB_TOKEN=$(cat ~/.config/github.qvacua.release.token) github-release release \ + --user qvacua \ + --repo vimr \ + --tag "${COMPOUND_VERSION}" \ + --name "${COMPOUND_VERSION}" \ + --description "${RELEASE_NOTES}" \ + --pre-release + +echo "### Uploading build" +GITHUB_TOKEN=$(cat ~/.config/github.qvacua.release.token) github-release upload \ + --user qvacua \ + --repo vimr \ + --tag "${COMPOUND_VERSION}" \ + --name "${VIMR_FILE_NAME}" \ + --file "${VIMR_FILE_NAME}"