From 3c8b800945e7a8ce6daaa142ac3e7c237c139b70 Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Sun, 30 Apr 2017 09:45:24 +0200 Subject: [PATCH] Add publish param to build job --- bin/build.sh | 10 ++++++++++ ci/create_build_job.groovy | 1 + 2 files changed, 11 insertions(+) diff --git a/bin/build.sh b/bin/build.sh index 89378e44..35f0c513 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -26,6 +26,11 @@ if [ "${RELEASE_NOTES}" == "" ] ; then exit 1 fi +if [ "${PUBLISH}" = true ] && [ "${RELEASE_NOTES}" == "" ] ; then + echo "### ERROR No release notes, but publishing to Github!" + exit 1 +fi + if [ "${IS_SNAPSHOT}" = false ] && [ "${UPDATE_APPCAST}" = false ] ; then echo "### ERROR Not updating appcast for release!" exit 1 @@ -71,6 +76,11 @@ echo "### Compund version: ${COMPOUND_VERSION}" echo "### Tag: ${TAG}" echo "### VimR archive file name: ${VIMR_FILE_NAME}" +if [ "${PUBLISH}" = false ] ; then + echo "Do not publish => exiting now..." + exit 0 +fi + ./bin/commit_and_push_tags.sh "${BRANCH}" "${TAG}" ./bin/create_github_release.sh "${COMPOUND_VERSION}" "${TAG}" "${VIMR_FILE_NAME}" "${RELEASE_NOTES}" ${IS_SNAPSHOT} diff --git a/ci/create_build_job.groovy b/ci/create_build_job.groovy index 4e5d1b60..c1bf6bb1 100644 --- a/ci/create_build_job.groovy +++ b/ci/create_build_job.groovy @@ -23,6 +23,7 @@ Builds a new snapshot of VimR and pushes the tag:
parameters { stringParam('BRANCH', 'develop', 'Branch to build; defaults to develop') textParam('RELEASE_NOTES', null, 'Release notes') + booleanParam('PUBLISH', true, 'Publish this release to Github?') booleanParam('IS_SNAPSHOT', true) booleanParam('UPDATE_APPCAST', true) stringParam('MARKETING_VERSION', null, 'If IS_SNAPSHOT is unchecked, you have to enter this.')