2012-03-17

release management utility

A simple utility for managing versioned releases.

DOWNLOAD. Use by dropping package files (example in docs/examples) on the Packager, and dropping install files (example in docs/examples) on the Installer. In both cases a settings.xml file needs to be in the same directory as the Packager and Installer applications.

We have a problem where I work: We generate a LOT of custom software. And we update it frequently. And it's spread across multiple clients and many, many machines. This leads to a strong need for a platform that can automate as much of this process as possible, and do it in a way that can grow with us as we respond to specific client requirements about releases and their management.

With a new large install on the horizon, I decided it was time to start tackling the project and spent a weekend writing the first pass at some utilities to address the issues. The language I chose was C#, partly because I was curious to try it, and partly because we have another software platform for resource management written in C#, and I'd like us to start standardizing our auxiliary tool sets and environments.

What I ended up with was two very rudimentary command line utilities: The Packager and Installer. They both operate on very simple xml files that simply make an association between a local folder and remote destination. The Packager takes the local folder, zips it, and uploads it. The Installer takes the remote file, downloads it, and installs it to the local folder.

Any folder that's sent to the Packager needs to have a release_notes.xml file at the top level. This file specifies the current version number of the app, which is used to give it a unique key when it's uploaded. The Installer will either install a specific version of the app, or find the most recent (based on version number, not date stamp) and install that.

It's simplistic right now, but provides a framework that gives some room for growth. It will be trivial to add automated release note generation, for example, as well as more logic about handling uploads, downloads and installs, to prevent redundant operations.

I was pretty impressed with C#. The language and libraries are extremely straightforward, and made the app trivial to write. The source code includes examples of using lambdas (in Program.cs), various FTP operations (getting and creating directories, getting a file size, and uploading and downloading files, all in shared/net/NetUtil.cs), reading XML files (in NetUtil.cs and model/Package.cs) and lots and lots of string and path manipulation.

No comments:

Post a Comment