Semantic Versioning, and how to use bumpversion

Image for post
Image for post

What is a semantic version?

Image for post
Image for post
Photo by XPS on Unsplash
Image for post
Image for post

Using Bumpversion to version a project

[bumpversion]
commit = True
tag = True
current_version = 1.0.0

[bumpversion:file:setup.py]

[bumpversion:file:VERSION]
import setuptools

with open("README.md", "r") as fh:
long_description = fh.read()


setuptools.setup(
name="my-project",
author="Craig Godden-Payne",
description="A utility that does something",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://xxxxxxxxxxxxxxx.git",
packages=setuptools.find_packages(),
include_package_data=True,
python_requires='>=3.0',
test_suite='tests',
version='1.0.0'
)
1.0.0
bumpversion patch - which will go from 1.0.0 -> 1.0.1
bumpversion minor - which will go from 1.0.0 -> 1.1.0
bumpversion major - which will go from 1.0.0 -> 2.0.0

Technologist who enjoys writing and working with software and infra. I write up all the things I learn as I go along to share the knowledge! beardy.digital

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store