Created
February 6, 2014 15:35
-
-
Save jctanner/8846529 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
#!/bin/bash | |
OLDRELEASE="1.4.3" | |
NEWRELEASE="1.4.4" | |
NEWRELEASENAME="Could This Be Magic" | |
cd ~ | |
rm -rf ansible | |
agc | |
cd ansible; git checkout release$OLDRELEASE; git checkout --track -b release$NEWRELEASE | |
CHERRY="git cherry-pick " | |
$CHERRY 191be7b951eb8c34b73b367334e0cb4343af0779 | |
################ | |
# MISC UPDATES | |
################ | |
sed -i.bak "s/$OLDRELEASE/$NEWRELEASE/" VERSION | |
rm VERSION.bak | |
sed -i.bak "s/$OLDRELEASE/$NEWRELEASE/" lib/ansible/__init__.py | |
rm lib/ansible/__init__.py.bak | |
sed -i.bak "s/$OLDRELEASE/$NEWRELEASE/" docsite/rst/index.rst | |
rm docsite/rst/index.rst.bak | |
################ | |
# RELEASES.txt | |
################ | |
OLDLINE=$(fgrep $OLDRELEASE RELEASES.txt) | |
NEWLINE="$NEWRELEASE \"$NEWRELEASENAME?\" - $(date +"%m-%d-%Y")\n$OLDLINE" | |
sed -i.bak "s/$OLDLINE/$NEWLINE/" RELEASES.txt | |
rm RELEASES.txt.bak | |
################ | |
# CHANGELOG.md | |
################ | |
#OLDLINE="1.5 \"Love Walks In\" - Release pending\!" | |
OLDLINE=$(fgrep $OLDRELEASE CHANGELOG.md) | |
NEWLINE="$NEWRELEASE \"$NEWRELEASENAME\" - $(date +"%B %d, %Y")\n\n" | |
NEWLINE="$NEWLINE- Fixed issue with newer versions of pip not having --use-mirrors\n\n$OLDLINE" | |
sed -i.bak "s/$OLDLINE/$NEWLINE/" CHANGELOG.md | |
rm CHANGELOG.md.bak | |
################ | |
# ansible.spec | |
################ | |
sed -i.bak "s/Version: $OLDRELEASE/Version: $NEWRELEASE/" packaging/rpm/ansible.spec | |
rm packaging/rpm/ansible.spec.bak | |
OLDLINE="%changelog" | |
NEWLINE="$OLDLINE\n\n" | |
NEWLINE="$NEWLINE* $(date +"%a %b %d %Y") Michael DeHaan <[email protected]> - $NEWRELEASE\n" | |
NEWLINE="$NEWLINE* Release $NEWRELEASE" | |
sed -i.bak "s/$OLDLINE/$NEWLINE/" packaging/rpm/ansible.spec | |
rm packaging/rpm/ansible.spec.bak | |
################ | |
# debian | |
################ | |
sed -i.bak "s/1.4.1 release (PENDING)/1.4.1 release/" packaging/debian/changelog | |
rm packaging/debian/changelog.bak | |
OLDLINE="ansible ($OLDRELEASE) unstable; urgency=low" | |
NEWLINE="ansible ($NEWRELEASE) unstable; urgency=low\n\n" | |
NEWLINE="$NEWLINE * $NEWRELEASE release\n\n" | |
NEWLINE="$NEWLINE -- Michael DeHaan <[email protected]> $(date +"%a, %d %B %Y %k:%M:%S") -0500\n" | |
NEWLINE="$NEWLINE\n$OLDLINE" | |
sed -i.bak "s/$OLDLINE/$NEWLINE/" packaging/debian/changelog | |
rm packaging/debian/changelog.bak | |
############################################################### | |
#echo "bring in the galaxy cli now. Press enter when finished:" | |
#read inval | |
############################################################### | |
git add VERSION | |
git add CHANGELOG.md | |
git add RELEASES.txt | |
git add docsite/rst/index.rst | |
git add lib/ansible/__init__.py | |
git add -f packaging/debian/changelog | |
git add packaging/rpm/ansible.spec | |
git commit -m "Update files for $NEWRELEASE release." | |
git tag -a v$NEWRELEASE -m "Tag release $NEWRELEASE" | |
#echo "NOW RUN: cd ansible; git push origin release$NEWRELEASE ; git push --tags" | |
echo "NOW RUN: cd ansible; git push --tags origin release$NEWRELEASE" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment