Skip to content

Instantly share code, notes, and snippets.

@smunilla
Last active March 2, 2017 16:08
Show Gist options
  • Save smunilla/66ecc31918279f8fc584dd0fce1f7158 to your computer and use it in GitHub Desktop.
Save smunilla/66ecc31918279f8fc584dd0fce1f7158 to your computer and use it in GitHub Desktop.
# Load deploy key for cloning/pushing openshift/openshift-online
ssh-add -D
ssh-add ${HOME}/.ssh/openshift-online/id_rsa
rm -rf online
git clone git@github.com:openshift/online.git
cd online/
# Check to see if there have been any changes since the last tag
if git describe --abbrev=0 --tags --exact-match HEAD >/dev/null 2>&1; then
echo ; echo "No changes since last tagged build"
echo "This is fine, continuing build"
else
#There have been changes, so rebuild
echo
echo "=========="
echo "Tito Tagging"
echo "=========="
tito tag --accept-auto-changelog
git push
git push --tags
echo
echo "=========="
echo "Tito building in brew"
echo "=========="
TASK_NUMBER=`tito release --yes --test brew | 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}
echo
echo "=========="
echo "Tagging package in brew"
echo "=========="
TAG=`git describe --abbrev=0`
COMMIT = `git log -n 1 --pretty=%h`
brew tag-pkg libra-rhel-7-candidate ${TAG}.git.0.${COMMIT}.el7
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment