Skip to content

0publish

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 setup 0publish like this:

0install add 0publish https://apps.0install.net/0install/0publish.xml

License: GNU Lesser General Public License
Zero Install feed: https://apps.0install.net/0install/0publish.xml
Source (Linux / macOS): https://github.com/0install/0publish
Source (Windows): https://github.com/0install/0publish-dotnet

Alternatives

  • If you're looking for a graphical environment instead, see 0publish-gui.
  • To add a new version of a program to a feed, consider using 0template to generate the XML for the new version and 0repo to add it to the master feed.
  • 0release provides a more complete solution for managing releases (0release uses 0publish or 0repo internally, but also handles many other aspects of making releases for you).

Options

-h, --help
Show help message and exit.
-a FEED, --add-from=FEED
Add the implementation(s) in FEED to this one, putting them in the most sensible <group> (so as to minimise duplication of requirements, etc).
--add-missing
Download missing archives, calculate manifest digests, etc.. (Windows only)
--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.
-c, --create
Create a new feed file (if non-existent) without prompting.
--catalog=FILE
Combine all specified feeds into a single catalog FILE. (Windows only)
-d ALG, --add-digest=ALG
Add extra digests using the given algorithm.
-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.
--gpg-passphrase=PASS
Use PASS to unlock the GnuPG secret key. (Windows only)
-kKEY, --key=KEY
Key to use for signing (if you have more than one, or if you want to resign with a different key).
--manifest-algorithm=ALG
Select the algorithm to use for manifest digests. May be specified multiple times. Defaults to sha1new and sha256 on Linux / macOS and to sha256new on Windows.
--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-interface-uri=URI
Set the canonical feed URL (the uri attribute on the root <interface> element).
--set-main=EXEC
Set the main executable.
--set-arch=ARCH
Set the architecture.
--set-released=DATE
Set the release date, using the format YYYY-MM-DD. On Windows you can also pass today for the current date, or an empty value to remove the date. On Linux / macOS this is typically used as 0publish --set-released $(date +%F) feed.xml.
--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.
--select-version=VERSION
Select version to use in --set-* commands.
-x, --xmlsign
Add an XML signature block. All remote feeds must be signed. As a side-effect, the corresponding public key is exported next to the feed as <KEYID>.gpg, so users' 0install clients can fetch it from the same directory to verify the signature.
-u, --unsign
Remove any signature.
-v, --verbose
More verbose output (for debugging).
-V, --version
Display version information.

FAQ

gpg: signing failed: secret key not available

By default, 0publish tries to sign the new version of the feed using the same key that signed the old version. You will get this error if you don't have this key (e.g. because someone else signed the old version). In that case, use -k to specify they key you want to use instead.

Why did my XML comments and formatting disappear?

Some versions of 0publish parse the feed into an object model and writes it back out from that, so comments and whitespace are not preserved.