5 releases

0.0.10 Aug 27, 2024
0.0.9 Aug 12, 2024
0.0.8 Dec 25, 2023
0.0.7 Sep 9, 2023
0.0.6 Sep 5, 2023

#238 in Operating systems

Download history 7/week @ 2024-07-31 183/week @ 2024-08-07 125/week @ 2024-08-14 309/week @ 2024-08-21 146/week @ 2024-08-28 89/week @ 2024-09-04 116/week @ 2024-09-11 135/week @ 2024-09-18 142/week @ 2024-09-25 66/week @ 2024-10-02 74/week @ 2024-10-09 121/week @ 2024-10-16 81/week @ 2024-10-23 79/week @ 2024-10-30 99/week @ 2024-11-06 903/week @ 2024-11-13

1,166 downloads per month

GPL-3.0+

150KB
4K SLoC

disperse

disperse is a simple application that I use to create releases for some of the free software packages I maintain. It's meant to streamline the releasing process, reducing the human effort involved in creating a release as well as the likelihood of a brown-bag release.

It can do one or more of the following:

  • check if CI is currently passing (for supported platforms, like GitHub)
  • derive the intended new version by checking existing releases and version strings specified in project files
  • update NEWS files with the release date
  • make sure various files contain the correct version string
  • verify that the testsuite runs successfully
  • optionally only create a release if there were no changes to the repository in the last X days (useful for running in a cronjob)
  • upload to a repository site:
    • sources and universal wheels to pypi, if the project is a Python project
    • crates.io, if the project is a rust project
  • create a git tag for the new release
  • create "release" entries (on supported platforms, like GitHub or Launchpad)

After the release has completed, it can also update e.g. NEWS for the next release.

Disperse was previously known as "releaser".

Configuration

To a large extent, disperse will automatically figure out what needs to happen. It can discover the projects you maintain on pypi by reading ~/.pypirc for your username and enumerating them.

It can parse and modify setup.py and Cargo.toml files.

It uses a configuration file (disperse.conf) for anything that can not be autodetected, and which lives in the repository root.

For example:


   tag_format: "dulwich-$VERSIONs"
   news_path: "NEWS"

Supported variables are:

  • $VERSION ("1.2.0")
  • $TUPLED\_VERSION ("(1, 2, 0)")
  • $STATUS\_TUPLED\_VERSION ('(1, 2, 3, "dev", 0)')

Basic usage

disperse has various subcommands. The core ones are:

  • release - create a new release for project in $CWD or at a specific URL
  • discover - find projects that the current user owns (e.g. on pypi) and release them if they have unreleased changes and are significant enough
  • validate - validate the disperse configuration

Running from docker

The easiest way to run disperse is to use the docker image at ghcr.io/jelmer/disperse. You'll need to make sure that appropriate SSH and PGP keys are available.

The author regularly runs disperse inside of a Kubernetes cronjob.

Future

In the future, I would like it to:

  • support more languages than just python and rust

Dependencies

~31–48MB
~824K SLoC