Skip to content

Commit

Permalink
Package version is now computed according to git tree (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
francis-clairicia authored Nov 12, 2023
1 parent 6ffa105 commit 1dacc87
Show file tree
Hide file tree
Showing 6 changed files with 370 additions and 20 deletions.
9 changes: 2 additions & 7 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
[bumpversion]
current_version = 1.0.0rc6
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?:(?P<release>rc|\.dev)(?P<serial>\d+))?
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?:(?P<release>rc)(?P<serial>\d+))?
serialize =
{major}.{minor}.{patch}{release}{serial}
{major}.{minor}.{patch}
message = Bump version: {current_version} -> {new_version}

[bumpversion:part:release]
first_value = .dev
first_value = rc
optional_value = final
values =
.dev
rc
final

[bumpversion:part:serial]
first_value = 1

[bumpversion:file:src/easynetwork/__init__.py]

[bumpversion:file:docs/source/conf.py]
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
.vscode/*
!.vscode/settings.example.json

# Auto-generated files at build time
src/easynetwork/version.py

# Compiled requirements
requirements*.txt

Expand Down
7 changes: 4 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,20 @@

import os.path
import sys
from importlib.metadata import version as get_version

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = "EasyNetwork"
copyright = "2023, Francis Clairicia-Rose-Claire-Josephine"
author = "FrankySnow9"
release = "1.0.0rc6"
version = release
release = get_version("easynetwork")
version = ".".join(release.split(".")[:3])

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

sys.path.append(os.path.abspath("./_extensions"))
sys.path.append(os.path.abspath(os.path.join(os.curdir, "_extensions")))

extensions = [
# Built-in
Expand Down
Loading

0 comments on commit 1dacc87

Please sign in to comment.