Skip to main content

Distriploy

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

Usage

After its installation, distriploy is typically called from your repo’s root folder using:

distriploy

or:

python -m distriploy

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

Run it with –help to get to know the options.

Prior to running distriploy, you might want to create a custom tag. It will be used to name the release. E.g.:

git tag -s r$(date +%Y%m%d)

Installation

distriploy is available on pypi:

python -m pip install --user distriploy

or you can grab a release or clone the repository and use it.

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

      Use requires installation with osf option, or subsequent installation of the osfclient dependency.

      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.

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

        Set it up with eg.:

        read OSF_USERNAME OSF_PASSWORD
        export OSF_USERNAME OSF_PASSWORD

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

    • 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.

TODO

  • get some use and feedback

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

Metadata

Release files for distriploy 0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for distriploy 0.16
File Size Uploaded
distriploy-0.16.tar.gz 10.4 kB Details

Release files / distriploy-0.16.tar.gz

Download URL distriploy-0.16.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4346edfecd3388a2562f1b476fd002ecfaa68da9e0709def4f9e2f2de66da34e
BLAKE2b-256 checksum
How to use checksums
91f4cd640ec565692149acdc88c7229b4fbfa6964421566367132c2d7074c129
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.16 This release

1 release file

0.15

1 release file

0.14

1 release file

0.13.0

1 release file

0.11.0

1 release file

0.10.0

1 release file

0.9.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page