Skip to content
ajuckel edited this page Jan 7, 2013 · 5 revisions

Releases

This page documents the process for creating new activerecord-jdbc-adapter releases.

One Project Many Gems

The project includes source and gem specifications for a number of gems.

The main gem, activerecord-jdbc-adapter, includes all the code for every database adapter. The activerecord-jdbcDB-adapter sub-gems mainly exist as meta-gems to pull in the driver dependencies where available. For example, activerecord-jdbcmysql-adapter depends on activerecord-jdbc-adapter as well as jdbc-mysql.

  • activerecord-jdbc-adapter
  • activerecord-jdbcderby-adapter
  • activerecord-jdbch2-adapter
  • activerecord-jdbchsqldb-adapter
  • activerecord-jdbcmssql-adapter
  • activerecord-jdbcmysql-adapter
  • activerecord-jdbcpostgresql-adapter
  • activerecord-jdbcsqlite3-adapter
  • jdbc-derby
  • jdbc-h2
  • jdbc-hsqldb
  • jdbc-jtds
  • jdbc-mysql
  • jdbc-postgres
  • jdbc-sqlite3

Adapters vs. Drivers

The jdbc-* gems contain only the JDBC driver jar files. The activerecord-jdbc*-adapter gems are the actual gems used to connect Rails to a JDBC database within JRuby.

A normal release of AR-JDBC will only push gems for the activerecord-jdbc*-adapter gems. The dependencies to JDBC driver gems are defined loosely (with the "spermy" ~> operator) so that driver gems can be released independently.

Releasing a Driver

Individual driver gems are versioned with the same version as the upstream JDBC driver jar file (or similar, to make the version conform to Rubygem number-only release version standards).

Usually a new driver release will involve commits that add the new drivers, remove the old ones, and update the version in lib/jdbc/<driver>.rb.

Once the files are in place, you can build the driver with the jdbc-<driver>:build task:

$ rake jdbc-derby:build
jdbc-derby 10.6.2.1 built to pkg/jdbc-derby-10.6.2.1.gem
cp jdbc-derby/pkg/jdbc-derby-10.6.2.1.gem pkg

And you can release a driver with the jdbc-<driver>:release task which will build and push the gem to rubygems.org.

Summary

  1. Update the new driver jar files.
  2. Remove the old driver jar files.
  3. Update the version in jdbc-<driver>/lib/jdbc/<driver>.rb..
  4. Release the driver with rake jdbc-<driver>:release.

Releasing the Adapters

Unlike drivers, adapters are released all at once. The adapters:build task builds the adapter gems, while the adapters:release task builds, tags the git repository, and pushes the gems to rubygems.org.

Summary

  1. Make sure tests run, check Travis build results, and ensure that as many test suites pass as possible.
  2. Update the lib/arjdbc/version.rb with the new version.
  3. Run rake adapters:build to make sure you can build gems of all adapters.
  4. Ensure there are no uncommitted files!
  5. Ensure there is no v<version> tag! (adapters:release will create it for you.)
  6. Run rake adapters:release to re-build gems, tag, and push to rubygems.org.