Skip to content

feat(versioning): add initial versioning documentation with auto-gene… #834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions VERSIONING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Versioning

## Auto Generated Version Examples
These are examples of how our configuration of [poetry-dynamic-versioning](https://github.com/mtkennerly/poetry-dynamic-versioning) will generate the version number.

If branch is not main and there are commits since last tag:
```
tux 0.0.0.dev2106+b731156.dynamicversioning
^ ^ ^ ^ ^
name^ commits commit branch (escaped), is empty if its main
ver since hash
last
tag
```
If branch is main and there are commits since last tag:
```
tux 0.0.0.dev2106+b731156
^ ^ ^ ^
name^ commits commit
ver since hash
last
tag
```
If branch is main and there are no commits since last tag:
```
tux 0.0.0
^ ^
name^
ver
```

## Scheme
We use PEP 440 for formatting our version numbers, however we use SemVer for the versioning scheme.
> Keep in mind you cannot use .dev(NUMBER) as it clashes with the auto generated versioning. (e.g 0.1.0rc1.dev1 is invalid and won't show up properly)

## SemVer Summary
A example in tux would be:
Given a version number MAJOR.MINOR.PATCH, increment the:

MAJOR version when you make changes that may need significant manual setup from the last version (example would be a web panel, config overhaul, major db changes)
MINOR version when you make changes that needs little to no manual interference (at most maybe tweaking a config value or updating the db)
PATCH version when you make changes that need no manual interference

You can add stuff like "0.1.0**rc1**" to mark small changes leading up to a release. (release candidates)

You do not need to stick to this absolutely all the time, this is a guideline on how to make your versioning.