Skip to main content

Release deployment utility

Project description

This tool can assist you to perform deployment of release artifacts.

Usage

Typically called from your repo using:

python -m distriploy

The repo should have been configured prior to that, see configuration.

Configuration

An enabled repository has a .distriploy.yml file in its root folder. See this repo’s for inspiration.

The file is YAML, it contains an object with the following members:

  • release: release information object

  • release.method: release method. Supported values are:

    • github: the project has a github repo.

      Additional info may be provided if so:

      • release.remote: string, optional (defaults to origin)

        The local git repo remote corresponding to github.

      • postrelease.add_mirror_urls: bool (defaults to false)

        Whether to add to the release description a list of mirrors. Limited use because if github is down, the list is not accessible.

      • Environment variable GITHUB_TOKEN, must be populated by user, contains a token string created from https://github.com/settings/tokens

        Set it up with eg.:

        read GITHUB_TOKEN
        export GITHUB_TOKEN

        Or add it to an environment file not under revision control.

  • mirrors: mirroring information object, containing members whose key is a mirror handle.

    Each entry contains:

    mirrors.${mirror}.method: mirroring upload method. Supported values (unsupported are ignored, with a warning) are (TODO):

    • osf: upload to https://osf.io

      Additional info may be provided if so:

      • project: string, OSF project key

      • folder: string, OSF file folder

      • name: string, optional (defaults to release artifact name)

        Useful if using OSF’s revision system.

    • rsync: upload with rsync

      Additional info may be provided if so:

      • remote: string, rsync destination

      • public: string, public URI prefix, accessible once upload is completed

    • academictorrents: create torrent file, and upload to https://academictorrents.com

      The torrent file will be generated in cwd, named like the release artifact and added`.torrent` extension.

      Additional info may be provided if so:

      • params: object, academictorrents upload params, to be POST’ed

      • Environment variables ACADEMICTORRENTS_USERNAME and ACADEMICTORRENTS_PASSWORD, must be populated by user, they come from uid & pass in https://academictorrents.com/about.php#apikeys

        Set it up with eg.:

        read ACADEMICTORRENTS_USERNAME ACADEMICTORRENTS_PASSWORD
        export ACADEMICTORRENTS_USERNAME ACADEMICTORRENTS_PASSWORD

        Or add it to an environment file not under revision control.

License

MIT.

Releasing

read version # eg. 0.14
sed -i -e 's/^version = .*/version = "'${version}'"/g' setup.py
git add setup.py
git commit -m "preparation for v${version}"
git tag --annotate --message "" v${version}
git push; git push --tags
rm -rf dist; python setup.py sdist && twine upload dist/* -r pypi
python -m distriploy

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

distriploy-0.15.tar.gz (9.1 kB view details)

Uploaded Source

File details

Details for the file distriploy-0.15.tar.gz.

File metadata

  • Download URL: distriploy-0.15.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.7

File hashes

Hashes for distriploy-0.15.tar.gz
Algorithm Hash digest
SHA256 eb09b3bc907c2c2d80d92756848e127d36b07846af7a3d738e17638a4dd470ee
MD5 bf0ad2773b80e1a38d962c6d33655a63
BLAKE2b-256 f8198b0984aa4df3cbb65145d29ae4d58d2f65c46fe3ef50c696d7ea7a668428

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