Skip to content

Instantly share code, notes, and snippets.

@dkubb
Created Nov 18, 2008
Embed
What would you like to do?
DataMapper release process (for dm-core and dm-more)
# Setup Rubyforge gem
#rubyforge setup # set up username/password
rubyforge login # test username/password
rubyforge config # sync up projects
# Uninstall previous versions of dm-core, dm-more, data objects and extlib
# (From: http://gist.github.com/31187)
gem list '\A(?:(?:d[mo])[_-]|data_?(?:mapper|objects)|extlib)' --no-versions \
| xargs sudo gem uninstall -aIx
# Install latest stable DO gems
sudo gem install do_sqlite3 do_mysql do_postgres
# Check out clean repos:
mkdir /tmp/dm-gem
cd /tmp/dm-gem
git clone git@github.com:datamapper/dm-core.git
git clone git@github.com:datamapper/dm-more.git
git clone git@github.com:datamapper/data_mapper.git
# Compile, run the specs and check the manifest of each:
cd dm-core
rake spec clobber
rake check_manifest | patch # update Manifest.txt
git commit -v -a -e -m "Updated Manifest.txt to include missing files"
rake package && sudo rake install && rake clobber
cd -
cd dm-more
rake spec clobber
rake update_manifest # updates all Manifest.txt files
git commit -v -a -e -m "Updated Manifest.txt to include missing files"
rake package && sudo rake install && rake clobber
cd -
# Fix any failing specs
# Update the History.txt for each gem
# Release the Gems
cd dm-core
sudo rake clobber
rake release VERSION=0.10.1
git tag -a 0.10.1 -m "0.10.1 gem release"
git push --tags
cd -
cd dm-more
sudo rake clobber
rake release_all
git tag -a 0.10.1 -m "0.10.1 gem release"
git push --tags
cd -
# Release Meta gem
cd data_mapper
rake check_manifest | patch # update Manifest.txt
git commit -v -a -e -m "Updated Manifest.txt to include missing files"
rake release VERSION=0.10.1
git tag -a 0.10.1 -m "0.10.1 gem release"
git push --tags
cd -
# Also rename the files to datamapper (and find/replace the text)
# and release a second meta-gem named "datamapper".
# - There's got to be a better way to do this.
# Send message to mailing list about new version
# Update @datamapper twitter account to notify people the new version
# has been released.
# POST RELEASE
# ------------
# Update the dev version to next increment
find dm-core/* dm-more/* data_mapper/* -type f -exec egrep -l '\b0\.10\.0\b' {} \;
#find dm-core/* dm-more/* data_mapper/* -type f -exec perl -pi -e 's!\b0\.10\.0\b!0.10.1!g' {} \;
cd dm-core
git commit -v -a -e -m "Updated version and gem dependencies"
git push
cd -
cd dm-more
git commit -v -a -e -m "Updated version and gem dependencies"
git push
cd -
cd data_mapper
git commit -v -a -e -m "Updated version and gem dependencies"
git push
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment