Pcsvnrelease

From ProgClub
Jump to: navigation, search

Pcsvnrelease is the ProgClub project release script. That's the software that helps us manage versioned releases of our projects as specified on the versions page. For other projects see projects.

Status

Under way. Not released yet, there's stuff TODO.

Administration

Contributors

Members who have contributed to this project. Newest on top.

All contributors have agreed to the terms of the Contributor License Agreement. This excludes any upstream contributors who tend to have different administrative frameworks.

Upstream contributors:

  • TBA

Copyright

Copyright 2012, Contributors.

License

Licensed under the New BSD license.

Resources

Source code

The repository can be browsed online:

https://www.progclub.org/pcrepo/pcsvnrelease

The latest stable released version of the code is available from:

https://www.progclub.org/svn/pcrepo/pcsvnrelease/tags/latest

Or if you want the latest version for development purposes:

svn://www.progclub.org/svn/pcrepo/pcsvnrelease/trunk

Links

  • Versions, for information about the ProgClub version number system.

Specifications

Functional specification

Standard /etc scripts

Within a branch there might be an /etc folder, and in /etc might be a 'test' or 'set-version' script as standard.

/etc/test

The 'test' script, if it exists, will be executed by pcsvnrelease before beginning a release to confirm that the software is fit for release. If the 'test' script exits with a non-zero error level the release is aborted because crucial tests have failed.

/etc/set-version

The 'set-version' script, if it exists, will be called by pcsvnrelease after the VERSION* and RELEASE files have been updated so that if the project version number needs to be copied in to other files before a release the 'set-version' script can take care of that if necessary.

SUBPROJECTS file

The SUBPROJECTS file lives in the branch root and lists the projects that are managed as subprojects and released in conjunction with the main project. The format of the SUBPROJECTS file is:

externals_path subproject_path subproject_url subproject_branch

For example, the 'slib' project might be included as a subproject with an entry in the SUBPROJECTS file like this:

lib/slib slib svn://www.progclub.org/svn/pcrepo/slib /trunk

Or if you wanted to use the latest maintenance release of version 1 of slib and ignore newer major versions:

lib/slib slib svn://www.progclub.org/svn/pcrepo/slib /branches/version/1

Note: when subprojects are released they are always minor releases even if the main project is having a major release.

Any svn:externals definitions that are defined on a project's subfolders that aren't listed in the SUBPROJECTS file don't get treated as subprojects and released but they do get set to a specific revision (with a revision and peg revision both set to the revision the repository is at at the time of the release). So if you didn't want to manage slib as a subproject but rather wanted to use a specific release of slib you could just define the svn:externals for slib to point at:

svn://www.progclub.org/svn/pcrepo/slib/tags/version/1/4

Or:

svn://www.progclub.org/svn/pcrepo/slib/tags/release/2012/03/15/001

Or if you just wanted to use the latest release (but not manage slib as a subproject) you could specify an svn:externals of:

svn://www.progclub.org/svn/pcrepo/slib/tags/latest

Minor release

To do a typical minor release of the pcsvnrelease project:

$ pcsvnrelease minor svn://www.progclub.org/svn/pcrepo/pcsvnrelease /trunk

Or to release a specific branch (e.g. the version 1 branch) of the pcsvnrelease project:

$ pcsvnrelease minor svn://www.progclub.org/svn/pcrepo/pcsvnrelease /branches/version/1

Major release

To do a typical major release of the pcsvnrelease project:

$ pcsvnrelease major svn://www.progclub.org/svn/pcrepo/pcsvnrelease /trunk

Or to release a specific branch (e.g. the version 1 branch) of the pcsvnrelease project:

$ pcsvnrelease major svn://www.progclub.org/svn/pcrepo/pcsvnrelease /branches/version/1

Technical specification

Pcsvnrelease is implemented as a BASH script that uses the svn command-line utility to manipulate the repository.

Tasks

TODO

Things to do, in rough order of priority:

  • Implement minor releases
  • Implement major releases

Done

Stuff that's done. Latest stuff on top.

  • JE 2012-03-15: created project in svn with prototype release script and test repos.
  • JE 2012-03-15: created project page.

Notes

Notes for implementers

If you are interested in incorporating this software into your project, here's what you need to know:

Just copy and paste your way to victory, this script is pretty much stand-alone.

Notes for developers

If you're looking to set up a development environment for this project here's what you need to know:

There are testing repositories at:

Those repositories have been setup with projects and dependencies so that you can test the release script on the 'testproj-a' project like this:

$ pcsvnrelease minor svn://www.progclub.org/svn/pctestrepo-a/testproj-a trunk
$ pcsvnrelease major svn://www.progclub.org/svn/pctestrepo-a/testproj-a trunk
$ pcsvnrelease minor svn://www.progclub.org/svn/pctestrepo-a/testproj-a branches/version/1
$ pcsvnrelease major svn://www.progclub.org/svn/pctestrepo-a/testproj-a branches/version/1

When you release 'testproj-a' from 'pctestrepo-a' it should trigger a sub-release of 'testproj-b' from 'pctestrepo-b' and 'testproj-c' from 'pctestrepo-a'.