Created
February 24, 2017 14:46
-
-
Save smunilla/c17b721f554f373c7e6a7e4b5f0f4595 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
MINOR="5" | |
# Load deploy key for cloning/pushing openshift/openshift-ansible | |
#ssh-add -D | |
#ssh-add ${HOME}/.ssh/openshift-ansible/id_rsa | |
rm -rf openshift-ansible | |
git clone [email protected]:openshift/openshift-ansible.git | |
cd openshift-ansible/ | |
git checkout release-1.${MINOR} | |
# Check to see if there have been any changes since the last tag | |
HEAD_COMMIT="$(git log -n1 --oneline | awk '{print $1}')" | |
echo $HEAD_COMMIT | |
LAST_TAG=$(git describe --abbrev=0 --tags) | |
git checkout -q ${LAST_TAG} | |
LAST_COMMIT="$(git log -n1 --oneline | awk '{print $1}')" | |
echo $LAST_COMMIT | |
if [ "${HEAD_COMMIT}" == "${LAST_COMMIT}" ]; then | |
echo ; echo "No changes in release-1.${MINOR} since last build" | |
echo "This is good, so we are exiting with 0" | |
exit 0 | |
fi | |
#There have been changes, so continue | |
echo | |
echo "==========" | |
echo "Tito Tagging" | |
echo "==========" | |
tito tag --accept-auto-changelog | |
export VERSION="v$(grep Version: openshift-ansible.spec | awk '{print $2}')" | |
echo ${VERSION} | |
git push | |
git push --tags | |
echo | |
echo "==========" | |
echo "Tito building in brew" | |
echo "==========" | |
TASK_NUMBER=`tito release --yes --test aos-${OSE_VERSION} | grep 'Created task:' | awk '{print $3}'` | |
echo "TASK NUMBER: ${TASK_NUMBER}" | |
echo "TASK URL: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=${TASK_NUMBER}" | |
echo | |
brew watch-task ${TASK_NUMBER} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment