Skip to main content

Enables powerful automation from a subversion repository.

Project description

Welcome to svnpublish, a tool to enable automated publishing (and any other arbitrary commands to be executed) when updates are made to a subversion version control repository.

Publishing configurations are tied to either the entire repository or restricted to subdirectories, referred to as a publishing point in svnpublish-speak.

TL;DR

Install:

$ pip install svnpublish
$ mkdir -p /etc/svnpublish
$ svnpublish --init-options > /etc/svnpublish/myrepos.yaml

# edit the configuration file
$ vi /etc/svnpublish/myrepos.yaml

Put in your REPOSITORY/hooks/post-commit:

#!/bin/sh
svnpublish --options /etc/svnpublish/myrepos.yaml "$@"

If running in asynchronous mode:

TODO: show example of getting svnpublishd running

Overview

TODO: add docs

Global Configuration

The best way to set the initial svnpublish options is to use the --init-options flag, which outputs a list of all available options accompanied with documentation. The recommended approach is to create a per-repository configuration in /etc/svnpublish/ which can be done as follows:

$ sudo mkdir -p /etc/svnpublish
$ svnpublish --init-options | sudo tee /etc/svnpublish/REPOSITORY.yaml > /dev/null
$ sudo vi /etc/svnpublish/REPOSITORY.yaml

And then modifying all of the options as needed. At a minimum, the following options should be set:

  • admin

  • label

  • name

  • reposUrl

  • genemail.default.headers.from

Publishing Point Configuration

TODO: add docs

publish:

  ENGINE:

    ATTRIBUTE: VALUE

Example:

publish:

  # send an email notification
  - engine:       email
    mailfrom:     noreply@example.com
    recipients:
                  - user1@example.com
                  - user2@example.com

  # update an RSS (atom) feed
  - engine:       rss
    window:       50
    label:        Repository Feed
    output:       /var/www/rss/output.xml
    feedUrl:      https://svn.example.com/rss/output.xml

  # export the repository to the file system
  - engine:       export
    path:         /var/www/example.com
    fixate:
                  - { engine: fingerprint }
                  - { engine: fingerprint, path: htdocs/fingerprint }

  # export the repository to a remote host
  - engine:       export
    remote:       svnpublish@example.com
    keychain:     /home/svnpublish/.keychain
    path:         /var/www/example.com
    fixate:
                  - { engine: fingerprint }
                  - { engine: fingerprint, path: htdocs/fingerprint }

Signed or Encrypted Email

  • create a directory

    mkdir -p /path/to/gpghome chmod 700 /path/to/gpghome

  • for signing, you need a key. generate one:

    gpg –homedir /path/to/gpghome –gen-key

  • for encrypting, you need to add the public key of every recipient. do so:

    gpg –homedir /path/to/gpghome –gen-key

  • configure genemail to use the svnpublish.email.GpgModifier:

    TODO …

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

svnpublish-2.0.2.tar.gz (53.0 kB view details)

Uploaded Source

File details

Details for the file svnpublish-2.0.2.tar.gz.

File metadata

  • Download URL: svnpublish-2.0.2.tar.gz
  • Upload date:
  • Size: 53.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for svnpublish-2.0.2.tar.gz
Algorithm Hash digest
SHA256 60c269556837d142eb381423112b19e6324fcd542ba80f1e4d9615c1a3d7f45b
MD5 8a7d40b09654be9a941d0367c3669974
BLAKE2b-256 d09d7b564bb6498b24f647d6a7eb4bacfd0e0399395efb73423c70f625e4ccd8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page