Dec 15, 2014
For some time we have been using a release_egg.sh script found in some plone svn repository (currently unreachable) to do proper egg releases, bump the egg version and upload them to pypi or our custom repository. But now we are moving to use zest.releaser for both public and private eggs. We have written two add-ons for it to ease our move from our previous hand-made-scripts.

Normaly we create a password protected folder in one of our servers and we upload there the eggs we develop for our clients. We have one folder per client, and thus we tuned the release_egg.sh script to ask which folder should it upload the egg to.

But we also publish some python packages on pypi so we needed to polish the CHANGELOG, the README and so on. Although there is a handy tool to do that (zest.releaser) we haven't used it because we wanted to have a unique way to publish our package regardless where we want to publish them.

So, some weeks ago I started to look at zest.releaser and specially to the add-on gocept.zestreleaser.customupload that allows to set in a configuration file where to upload your eggs based on their name.

But I needed a more generic solution, because I don't want to be adding a line to a file each time I create a project for a client. So I wrote cs.zestreleaser.upload. It requires to set a base folder and then asks the users to which folder in that base folder wants to upload the egg. This is useful if you have a structure like this one:

  • server.com:/var/static/eggs/client1
  • server.com:/var/static/eggs/client2

You just set server.com:/var/static/eggs/ as a base folder, and when releasing answer with 'client1' or 'client2', and it will upload the egg there.

commits to changelog

After seeing that, a colleague asked me if there was a way to copy the commits to the CHANGES file. zest.releasers encourages you to write proper CHANGES file but sometimes we are lazy...

There was a proposal to have something like this in the core but the original idea was rejected. Although it is not the best thing (CHANGES file should be written with usefull comments and not directly with all the commits), I created an add-on that asks the user if he wants to add all the commits to the CHANGES file while releasing the egg: cs.zestreleaser.changelog

Currently it only works with git (we only use git), but it is not hard to make it work for svn or hg, just provide a method to parse the commits

Both add-ons are available on pypi and also on our Github account, so if you find them useful, comments and patches are welcomed!

You may be interested in these other articles