From eb74411a5750cd34f8ddd01f076697563ec624c4 Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sun, 20 Apr 2025 00:16:49 -0500 Subject: [PATCH 1/3] feat(versioning): add initial versioning documentation with auto-generated examples --- VERSIONING.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 VERSIONING.md diff --git a/VERSIONING.md b/VERSIONING.md new file mode 100644 index 00000000..9763d8aa --- /dev/null +++ b/VERSIONING.md @@ -0,0 +1,32 @@ +# Versioning + +## Auto Generated Version Examples +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. From 9e28006db6bbc5b076e7b3f396ce8e7b9ba9e364 Mon Sep 17 00:00:00 2001 From: kzndotsh Date: Sun, 20 Apr 2025 04:11:50 -0400 Subject: [PATCH 2/3] Update docker-image.yml --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 0e8b3d26..e829901c 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -18,7 +18,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - ref: ${{ github.ref_name }} + ref: ${{ github.event.pull_request.head.ref || github.ref_name }} fetch-depth: 0 - name: Docker meta From da97579213a97676bce99b4669d01ed75b44d4b0 Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sun, 20 Apr 2025 20:36:50 -0500 Subject: [PATCH 3/3] docs(VERSIONING.md): enhance versioning guidelines with additional examples and clarifications --- VERSIONING.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/VERSIONING.md b/VERSIONING.md index 9763d8aa..875bff90 100644 --- a/VERSIONING.md +++ b/VERSIONING.md @@ -1,6 +1,8 @@ # 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 @@ -29,4 +31,16 @@ name^ ## 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. +> 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.