Releasing a larger project can be a daunting task. Of course, if you invest in the build infrastructure, it can be as easy as a executing a couple of scripts. When used right, the existing Pharo infrastructure can make this experience rather painless.
Here is a recount of the scripts used to produce the Moose 4.8 release.
The first priority was to publish a configuration that can be reloaded at any time in a fresh Pharo image. As Moose is composed of several components that can be reused separately, we wanted to release the code not only of the overall suite, but also for each of the components. Given that all these components rely on Metacello configurations, we could simply use Snapshotcello, a little utility for taking a snapshot of a configuration:
Gofer new smalltalkhubUser: 'girba' project: 'Snapshotcello'; package: 'ConfigurationOfSnapshotcello'; load. (Smalltalk at: #ConfigurationOfSnapshotcello) loadDevelopment.
Beside releasing the code, we also wanted to mark the newly snapshotted versions as stable for Pharo 2.0, and to push the committed configuration to the official Pharo 2.0 repository:
{ ConfigurationOfMooseAlgos->'2.4-snapshot'. ConfigurationOfFame->'1.3-snapshot'. ConfigurationOfPetitParser->'1.7-snapshot'. ConfigurationOfMondrian->'2.10-snapshot'. ConfigurationOfEyeSee->'1.1-snapshot'. ConfigurationOfRoassal->'1.428-snapshot'. ConfigurationOfGraphET->'0.2-snapshot'. ConfigurationOfGlamour->'2.5-snapshot'. ConfigurationOfGToolkit->'0.6-snapshot'. ConfigurationOfMoose->'4.8-snapshot' } do: [ :assoc | Snapshotcello new configurationClass: assoc key; sourceVersion: #development; targetVersion: assoc value; snapshot; makeStableFor: #'pharo2.x'; commit; pushToPharo20Repository.]
Once the image available, we needed to create the executable bundles. For this, we simply used a bash script that relied on the excellent Pharo infrastructure, namely the Pharo Build scripts and the Pharo and Moose Zero Conf scripts.
#!/bin/bash # # moose-releaser.sh -- Builds a Moose release for each platform # based on https://gitorious.org/pharo-build # BASE_PATH="$(cd "$(dirname "$0")" && pwd)" BUILD_PATH="${WORKSPACE:=$BASE_PATH/builds}" VERSION_NUMBER="4.8" BUNDLE_NAME="moose_suite_4_8" git clone http://git.gitorious.org/pharo-build/pharo-build.git mkdir $BASE_PATH/pharo-build/builds mkdir $BASE_PATH/pharo-build/builds/moose cd $BASE_PATH/pharo-build/builds/moose wget -O- get.moosetechnology.org/ | bash echo "MooseImageSetupCommandLineHandler new installFonts; installAthens. MoosePanel open. World doOneCycle. Smalltalk snapshot: true andQuit: true." > moose-setup.st ./pharo Moose.image moose-setup.st mv pharo-vm/PharoV20.sources . cd $BASE_PATH/pharo-build ./build-platform.sh -i moose -o $BUNDLE_NAME -c moose -p mac -v $VERSION_NUMBER -t Moose ./build-platform.sh -i moose -o $BUNDLE_NAME -c moose -p win -v $VERSION_NUMBER -t Moose ./build-platform.sh -i moose -o $BUNDLE_NAME -c moose -p linux -v $VERSION_NUMBER -t Moose mv $BASE_PATH/pharo-build/builds/*.zip $BASE_PATH
This resulted in a zip file for each major operating system. That was it.
Releasing easily makes us release often. This enables user exposure, and hopefully, it enables user adoption.
But, releasing easily also provides engineering benefits: You know you are in control of your project if you can release at any time with one click. This is at the core of continuous delivery. This brings me to assessment: When releasing does not work easily, you are likely employing concepts that either are too complicated, or not well understood. Given that releasing can have deep economical impact, you might want to invest in learning how to do it.
In the case of Pharo, the base infrastructure was not well developed until a couple of years ago. Since then we built the infrastructure iteratively, until we obtained an infrastructure (Metacello, Snapshotcello, MetaRepository, Configuration Browser, ZeroConf, Pharo Build Scripts) that suites multiple rhythms. Now, a complex project that depends on many sub components, such as Moose, can be released in a couple of minutes. There is still ground to cover, but we understand much better now.