0publishMaking a new release of your software can be time consuming and error-prone, so you'll probably want to script as much as possible of it. The 0publish command provides a set of useful transformations for feed files which you can integrate into your release scripts. If you're looking for a graphical environment instead, see 0publish-gui in the packaging guide. Note: 0release provides a more complete solution for managing releases (0release uses 0publish internally, but also handles many other aspects of making releases for you). |
|
General operation
0publish edits feed files in place. It loads the file, transforms it in some way (such as setting the release date, or adding a new implementation) and then writes it back out again. If the input file was signed, it will resign it when saving with the same key by default. You can also use it to add a signature, or to change the signing key.
You can create an alias for 0publish in the usual way, to save typing:
$ 0alias 0publish http://0install.net/2006/interfaces/0publish
In build scripts, you would use the full URI or create a local function so that users don't need to run 0alias first in order to build your program (assuming you use 0publish as part of the build process).
SCons packaging tutorial shows many examples of using 0publish. For a full real-life example of a build script that uses 0publish, look at rox-release.
Note: the ROX-Filer packaging example has moved to here: packaging ROX-Filer.
0publish reference
Usage: 0publish [options] feed.xmlOptions
- -h, --help
- Show help message and exit.
- --add-version=VERSION
- Add a new implementation (use with --archive-url, etc).
- --archive-url=URL, --archive-file=FILE, --archive-extract=DIR
- Change a local implementation to one with a digest and an archive. See the SCons tutorial for an example.
- -c, --create
- Create a new feed file (if non-existant) without prompting.
- -e, --edit
- Edit with $EDITOR. This is useful if the file is signed, since it removes the signature at the start and resigns at the end. It also checks that the new feed is valid before overwriting the old copy.
- -g, --gpgsign
- Add a GPG signature block. Deprecated; use --xmlsign instead.
- -kKEY, --key=KEY
- Key to use for signing (if you have more than one, or if you want to resign with a different key).
- -lLOCAL, --local=LOCAL
- Create or update a feed from another feed.
- --manifest-algorithm=ALG
- Select the algorithm to use for manifest digests.
- --set-id=DIGEST
- Set the implementation ID. Note: it's usually easier to use the --archive-* options, since they calculate the digest for you.
- --set-main=EXEC
- Set the main executable.
- --set-arch=ARCH
- Set the architecture.
- --set-released=DATE
- Set the release date. Typically used as 0publish --set-released `date +%F` feed.xml, which sets today's date.
- --set-stability=STABILITY
- Set the stability rating.
- --set-version=VERSION
- Set the version number (used when making a release from CVS).
- -s, --stable
- Mark the current testing version as stable.
- -x, --xmlsign
- Add an XML signature block. All remote feeds must be signed.
- -u, --unsign
- Remove any signature.
- -v, --verbose
- More verbose output (for debugging).
- -V, --version
- Display version information.