The value of a simple release process

I’ve been doing many of the CakePHP releases, since “the great framework apocalypse of imminent doom”. Between then and now, CakePHP has had quite a few releases. During these past few months, I’ve really begun to understand the value of a simple release process. When I initially started doing releases for CakePHP, our release process involved many steps and I was doing them all manually. This release system while functional, was tedious, and error prone. One such error resulted in a packaged release having the wrong version number in the console. It also required me to set aside an hour or more in order to complete the various steps. The old release process looked something like this.

  • Update VERSION.txt to reflect new version number
  • Update home.ctp to reflect new changelog
  • Update config.php to reflect new version number.
  • Commit changes and create tag in git.
  • Create tar.gz, zip, tar.bz2 and dmg packages.
  • Upload packages to cakeforge / other sites.
  • Create and reformat changelog, paste it into the wiki.

Automation and simplification to the rescue!

To fix the tedious and convoluted release cycle, I automated what could be automated, and removed no longer needed steps. The move to github was huge in this respect. Github automatically creates tar & zip files for every tag in the repository. This saved me a number of steps I no longer needed to create and upload packaged files at all. Creating and uploading package files was a serious pain point in the original process. I wrote a few scripts scripts to automate a few of the more error prone steps. Firstly, I wrote a python script for updating version numbers to avoid embarrassing version number mistakes I had made in the past. Secondly, using the power of git, and some command line awk tricks with help from jperras making change logs is now a one step process. With these changes the release process now looks something like this.

  • Run update 1.3.0-RC1
  • Commit changes and create tag in git.
  • Run the changelog script and paste into wiki page.

This greatly simplified the release process for CakePHP. Instead of taking almost an hour or more, I can do release packages in minutes. I’ve learned a very important lesson the hard way. Keeping your project’s build/release cycle easy to use and fast to complete will make your life easier and more pleasant. In addition it will make you less hesitant to actually do releases, and makes it easier to teach others how to do it.


Is there an advantage to using Python for this instead of PHP? I love the design and footer of the site too btw.

Jason M on 3/8/10

I totally agree with that, in particular on the “it will make you less hesitant to actually do releases” point.

Sebastien Charrier on 3/8/10

Jason: I don’t think there is a measurable advantage to using python. I just like using python :) I’m sure you could create a similar script in PHP or any other language.

mark story on 3/8/10

You should check

elventails on 3/9/10

Comments are not open at this time.