Sign inSign up

etsinfra/drone-bump-version

By etsinfra

•Updated about 3 years ago

Drone plugin to bump version based on changelog following keepachangelog format.

Image
0

1.9K

etsinfra/drone-bump-version repository overview

⁠Quick reference (cont.)

⁠What is the purpose of this image?

Drone⁠ plugin to bump version based on changelog following keepachangelog⁠ format.

drone logo

The following steps are executed by this plugin:

  1. Guess new version number based on the Unreleased changelog section.
  2. Move Unreleased changelog section within a new section for this new version.
  3. Optional: Update __version__ value in version file.
  4. Commit and push changelog (and version file if provided).
ParameterDescription
changelog_pathPath to the changelog. Default to CHANGELOG.md in current folder.
version_file_pathPath to the python file containing the version. If not provided, no file will be updated.
skip_commit_authorIf provided and the value matches the one from the commit author user name⁠, this plugin will not do anything.
github_tokenToken (repo permission) used to commit (and update repository permissions temporarily if needed). Default to the drone GIT password⁠ (if available). Related user needs to have admin role in repository.
user_nameName of the GIT commit user. Default to the drone GIT user name⁠.
user_emailemail of the GIT commit user. Default to the drone GIT user email⁠.
dry_runIf set, there will be no effective version bump. Default to dry-run if this is a pull request⁠.
mandatory_changelog_entryStep will fail if this is set and there is no changes in Unreleased section within changelog. Do nothing by default.

⁠How to use this image

⁠Add a step to your drone pipeline

kind: pipeline
type: docker
name: default

steps:
- name: bump_version
  image: etsinfra/drone-bump-version:latest
  settings:
    changelog_path: custom_folder/CHANGELOG.md
    version_file_path: custom_folder/__init__.py
    github_token: cc1cc11111111ccc1c11c1cc1ccc1c1cc1111c1c
    user_name: user
    user_email: [email protected]

Tag summary

Content type

Image

Digest

sha256:a70856ca9…

Size

340.9 MB

Last updated

about 3 years ago

docker pull etsinfra/drone-bump-version