2016-10-14 13:31:51 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-10-14 15:26:14 +03:00
|
|
|
# For jenkins
|
|
|
|
|
2016-10-14 13:31:51 +03:00
|
|
|
set -e
|
|
|
|
|
|
|
|
export PATH=/usr/local/bin:$PATH
|
|
|
|
|
|
|
|
# # parameters
|
2016-10-14 15:26:14 +03:00
|
|
|
# - BRANCH
|
|
|
|
# - IS_SNAPSHOT
|
|
|
|
# - MARKETING_VERSION
|
|
|
|
# - RELEASE_NOTES
|
2016-10-14 13:31:51 +03:00
|
|
|
|
2016-10-15 10:38:09 +03:00
|
|
|
echo "### Building VimR"
|
|
|
|
|
2016-10-14 13:46:15 +03:00
|
|
|
./bin/prepare_repositories.sh
|
2016-10-14 13:51:49 +03:00
|
|
|
./bin/clean_old_builds.sh
|
2016-10-14 13:46:15 +03:00
|
|
|
./bin/set_new_versions.sh ${IS_SNAPSHOT} "${MARKETING_VERSION}"
|
2016-10-17 23:35:29 +03:00
|
|
|
./bin/build_vimr.sh true
|
2016-10-14 13:31:51 +03:00
|
|
|
|
|
|
|
BUNDLE_VERSION=$(agvtool what-version | sed '2q;d' | sed -E 's/ +(.+)/\1/')
|
|
|
|
MARKETING_VERSION=$(agvtool what-marketing-version | tail -n 1 | sed -E 's/.*of "(.*)" in.*/\1/')
|
|
|
|
COMPOUND_VERSION="v${MARKETING_VERSION}-${BUNDLE_VERSION}"
|
2016-10-14 16:58:58 +03:00
|
|
|
TAG=${COMPOUND_VERSION}
|
2016-10-15 01:09:57 +03:00
|
|
|
if [ "${IS_SNAPSHOT}" = true ] ; then
|
|
|
|
TAG="snapshot/${COMPOUND_VERSION}"
|
|
|
|
fi
|
2016-10-14 16:58:58 +03:00
|
|
|
VIMR_FILE_NAME="VimR-${COMPOUND_VERSION}.tar.bz2"
|
2016-10-14 13:31:51 +03:00
|
|
|
|
2016-10-15 10:38:09 +03:00
|
|
|
echo "### Bundle version: ${BUNDLE_VERSION}"
|
|
|
|
echo "### Marketing version: ${MARKETING_VERSION}"
|
|
|
|
echo "### Compund version: ${COMPOUND_VERSION}"
|
|
|
|
echo "### Tag: ${TAG}"
|
|
|
|
echo "### VimR archive file name: ${VIMR_FILE_NAME}"
|
2016-10-14 13:31:51 +03:00
|
|
|
|
2016-10-15 10:38:09 +03:00
|
|
|
./bin/commit_and_push_tags.sh "${BRANCH}" "${TAG}"
|
2016-10-15 01:30:03 +03:00
|
|
|
./bin/create_github_release.sh "${COMPOUND_VERSION}" "${TAG}" "${VIMR_FILE_NAME}" "${RELEASE_NOTES}"
|
2016-10-14 22:59:36 +03:00
|
|
|
./bin/set_appcast.py "build/Release/${VIMR_FILE_NAME}" "${BUNDLE_VERSION}" "${MARKETING_VERSION}" "${TAG}" ${IS_SNAPSHOT}
|
2016-10-15 10:48:55 +03:00
|
|
|
./bin/commit_and_push_appcast.sh "${BRANCH}" "${COMPOUND_VERSION}" ${IS_SNAPSHOT}
|
2016-10-15 10:38:09 +03:00
|
|
|
|
|
|
|
echo "### Built VimR"
|