Created
March 22, 2016 22:14
-
-
Save ttddyy/9ee2c5f2c73ad36a1d03 to your computer and use it in GitHub Desktop.
Perform release for xenon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh -xe | |
# Perform release for xenon | |
# - create branch and tag in gerrit | |
# - deploy artifacts to OSS Sonatype staging repo | |
# | |
# TODO: change to receive args and validate | |
# | |
XENON_LOCAL_REPO=/Users/ttsuyukubo/repo/vmw/xenon-release | |
RELEASE_VERSION=0.7.5 | |
RELEASE_VERSION_COMMIT_ID=d51684ab5ba24b0fd3d6a2a54b22488fa8b93428 | |
RELEASE_BRANCH_NAME=v${RELEASE_VERSION} | |
RELEASE_TAG_NAME=${RELEASE_BRANCH_NAME}-release | |
# create gerrit branch | |
echo "Creating release branch in gerrit. branch=${RELEASE_BRANCH_NAME} commid_id=${RELEASE_TAG_NAME}" | |
ssh -p 29418 review.ec.eng.vmware.com gerrit create-branch xenon ${RELEASE_BRANCH_NAME} ${RELEASE_VERSION_COMMIT_ID} | |
cd ${XENON_LOCAL_REPO} | |
# check clean or not | |
if [ -z "$(git status --porcelain)" ]; then | |
# Working directory clean | |
echo "${XENON_LOCAL_REPO} is clean" | |
else | |
# Uncommitted changes | |
echo "${XENON_LOCAL_REPO} is dirty" | |
exit 1; | |
fi | |
echo "Tagging the branch. tag=${RELEASE_TAG_NAME} branch=${RELEASE_BRANCH_NAME}" | |
git fetch | |
git checkout ${RELEASE_BRANCH_NAME} | |
git tag -am "Tagging ${RELEASE_BRANCH_NAME}" ${RELEASE_TAG_NAME} | |
git push origin ${RELEASE_TAG_NAME} HEAD:refs/heads/${RELEASE_BRANCH_NAME} | |
# perform deploy | |
./mvnw clean install -DskipTests -Dfindbugs.skip=true -Dcheckstyle.skip=true | |
./mvnw -P release clean deploy -DskipTests -Dfindbugs.skip=true -Dcheckstyle.skip=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment