Skip to main content

Never == Next Version

Project description

ne-ver - Next Version

Ne-ver again the manual hassle to release a next version.

basic usage

Setup an environment with the dependencies once, if you haven't done that yet.

$ python -m venv .venv
$ source .venv/bin/activate
$ pip install ne-ver
$ never -h
usage: never [-h] [--settings | --no-settings] [-f SETTINGS_FILE] [-p PROJECT] {major,minor,patch}

Ne-ver again the manual hassle to release a next version

positional arguments:
  {major,minor,patch}

optional arguments:
  -h, --help            show this help message and exit
  --settings, --no-settings
                        whether to use a settings-file for your configuration, or provide the settings manually

required when using a settings-file for your configuration:
  -f SETTINGS_FILE, --settings-file SETTINGS_FILE
  -p PROJECT, --project PROJECT

Website: https://github.com/swesterveld/next

GitHub Personal Access Token

A GitHub Personal Access Token (PAT) is required to let never create pull requests for you. Make sure to generate a PAT in your GitHub Developer Settings, with at least the scope repo -- for full control of private repositories -- selected.

Add this token to the .env file at the root of your virtualenv. The .env file should be based on the .env.example file in the examples directory. Make sure to reload the virtualenv to activate the environment variable(s) defined in the .env file.

settings

Currently, the --no-settings flag doesn't work yet, so you should use a settings file. The settings file should be JSON-formatted. Its contents should be like:

{
  "projects": {
    "backend": {
      "path": "~/repos/some-repo-clone-of-backend-project",
      "branches": {
        "release": "release/{version}",
        "staging": "develop",
        "production": "master"
      },
      "version_file": "VERSION"
    },
    "frontend": {
      "path": "/home/jdoe/repos/some-repo-clone-of-frontend-project",
      "branches": {
        "release": "release/{version}",
        "staging": "develop",
        "production": "master"
      },
      "version_file": "VERSION",
      "package_metadata": "package.json"
    }
  }
}

run

An example, to bump the version from x.y.z to x.y.z+1 for project frontend defined in etc/never.config.json:

never patch --settings -f etc/never.config.json -p frontend

advanced usage: auto merge

When you would like to automagically merge the release branch created by never on GitHub, you should use a deploy key. To create one, issue:

ssh-keygen -t ed25519 -C "<comment>" -f <filename>

Where the outputfile should be specified by <filename>, and -C "<comment>" is optional, and could contain any comment that may be useful to help identify the key.

This results in a key-pair, with its private part in <filename> and its public part in <filename>.pub. In your repository settings (at https://github.com///settings), you should use the contents of those files to add a deploy key and a secret:

  • The public part should be added to your repository as a deploy key with write access.
  • The private part should be added as a new repository secret called NEVER_DEPLOY_KEY.

Besides that, a GitHub Action that will use these this key-pair to automagically merge the release branch is required. An example could be found at .github/workflows/merge-release.yml and should be copied to .github/workflows/ in your repository.

development

run in development mode

You could benefit from the option to run setuptools in development mode, which allows you to modify the source code and have the changes take effect without you having to rebuild and reinstall:

pip install  --editable .

build Python package

As a prerequisite for building a Python package you'll need a builder, such as PyPA build. If you haven't got a builder yet, you can obtain it via pip install build.

To invoke the builder:

python -m build

release to PyPI

python -m twine upload --repository pypi dist/*

dependencies

This project has some dependencies mentioned in the requirements.txt file. Documentation of these Python packages could be found at:

Other dependencies, from the Python Standard Library, are documented here:

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

ne-ver-3.1.2.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ne_ver-3.1.2-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file ne-ver-3.1.2.tar.gz.

File metadata

  • Download URL: ne-ver-3.1.2.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

File hashes

Hashes for ne-ver-3.1.2.tar.gz
Algorithm Hash digest
SHA256 3c5f50e810e49bfe7d7de83d0e1da39f1005247d60181bf7e5538cea6cf12401
MD5 f2de6119f04cf3ec3d9ff0207c54a649
BLAKE2b-256 ca6bec9ece8275fbabd4fc420c38dc94daf1e9c45ba590b8b77154535addc2fc

See more details on using hashes here.

File details

Details for the file ne_ver-3.1.2-py3-none-any.whl.

File metadata

  • Download URL: ne_ver-3.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

File hashes

Hashes for ne_ver-3.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 35258d26e6f569e33d0626f8c78b59fa993d5b06bed682a658bafe2a14034c9b
MD5 266271a033f001044e3130569a42354c
BLAKE2b-256 6a182e2b6753615da8c9d89f18c143e761311af847213c94f36d571f1c885363

See more details on using hashes here.

Supported by

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