Package: dodgem
dodgemVersion bumper for Python project files.Report Bug·Request FeatureTable of ContentsAbout The ProjectBuilt WithGetting StartedPrerequisitesInstallationUsageExample: Bump Minor VersionExample: From Commit MessageExample: Custom TagsRoadmapContributingLicenseContactAcknowledgmentsAbout The ProjectSometimes you need to bump the version in your Python project files automatically. For example, you might:Have a CI/CD pipeline, and want to automatically bump the patch version of your library on merge to yourdevelopbranchHave a workflow (e.g. on Bitbucket Pipelines, GitHub actions etc.) that allows developers to automatically perform version bumps by including tags in their commit message (e.g.[major],[minor])Just want to reduce the chances of human error when bumping version numbers manuallyDodgem is a command-line utility for doing all of the above, and a bit more, aiming to eventually cover as many Python project file formats as possible, but currently supporting:setuptools(setup.py) with theversion=named argumentpyproject.tomlmanaged by thePoetrydependency managerNamed after (version)bumper carswhich are also sometimes called dodgems in some dialects of English.(back to top)Built WithThis project uses:Clickfor its CLIPoetryfor dependency managementBlessingsfor colorized and formatted CLI output(back to top)Getting StartedGetting started is straightforward. Dodgem aims to automatically detect as much as possible.PrerequisitesYou'll need Python 3.7 or newer with pip to install Dodgem.InstallationInstall Dodgem using pip or your favourite Python dependency manager and you're done.pip3installdodgemTest your installation with:dodgem--helpYou should see help documentation printed.(back to top)UsageYou can usedodgem --helpfor detailed information on using the utility:Usage: dodgem [OPTIONS]

  Bump version numbers in a project file.

Options:
  --file TEXT              The file to parse (defaults to automatic
                           detection).
  --file-type TEXT         The file type to parse (defaults to automatic).
  --file-format TEXT       The file format to parse (defaults to automatic).
  --commit-message TEXT    The commit message to infer the version bump from.
  --no-auto-patch          If given, disables automatic patch version bump if
                           commit message provided.
  --major-tag TEXT         The commit message tag indicating a major version
                           bump.
  --minor-tag TEXT         The commit message tag indicating a minor version
                           bump.
  --patch-tag TEXT         The commit message tag indicating a patch version
                           bump.
  --prerelease-tag TEXT    The commit message tag indicating a prerelease
                           version bump.
  --ignore-tag-case        Ignores capitalization in commit message tags.
  --quiet                  Suppresses all extraneous output.
  --pep-440                Use PEP-440 for version strings.
  --bump-major             If given, performs a major version bump.
  --bump-minor             If given, performs a minor version bump.
  --bump-patch             If given, performs a patch version bump.
  --bump-prerelease        If given, performs a prerelease version bump.
  --bump-build             If given, performs a build version bump.
  --prerelease-token TEXT  The prerelease token to append.
  --build-token TEXT       The build token to append.
  --dry                    If given, does not write the version change to
                           disk.
  --help                   Show this message and exit.Example: Bump Minor VersionBump the minor version of your project like this:dodgem--bump-minorIf you don't want to commit the change to disk, use--drylike so:dodgem--bump-minor--dryIf the informational output given by the CLI is getting in the way of downstream processing, use--quiet:dodgem--bump-minor--quietExample: From Commit MessageDodgem can bump your project version based on a commit message. By default.If the message contains[major]then a major version bump will be performedIf the message contains[minor]then a minor version bump will be performedOtherwise, a patch version bump will be performedFor example, to use your lastgitcommit message to bump your projects version.dodgem--commit-message="$(gitlog-1)"Example: Custom TagsIf the default[major]and[minor]tags don't suit you, and you'd perfer(major),(minor)and anexplicit(patch)tag:dodgem--commit-message="$(gitlog-1)"--major-tag='(major)'--minor-tag='(minor)'--patch-tag='(patch)'--no-auto-patch(back to top)RoadmapSupportsetuptools(setup.py)SupportPoetrySupport prerelease/build versions (shoutout to@mitchelkosterfor the feature idea)See theopen issuesfor a full list of proposed features (and known issues).(back to top)ContributingAny contributions are very welcome. Please fork the project and open a PR, or open an issue if you've found a bug and/or would like to suggest a feature.(back to top)LicenseDistributed under the MIT License. SeeLICENSE.txtfor more information.(back to top)ContactSaul Johnson -@lambdacasserole-saul.a.johnson@gmail.comProject Link:https://github.com/lambdacasserole/dodgem(back to top)AcknowledgmentsThe following resources are awesome:Best-README-Templatewas used for this readmetomlkitwas used for parsing TOML in a way that preserves comments, order, formatting etc.semverwas used for parsing and bumping semver numbersShoutout to@mitchelkosterfor contributing a load of feature ideas, and rooting out a bunch of bugs and edge cases!(back to top)