forked from psychopy/psychopy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request psychopy#6666 from peircej/PKG-versioning
PKG: dynamic versioning with setuptools-git-versioning
- Loading branch information
Showing
6 changed files
with
36 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2024.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,9 @@ | |
|
||
import os | ||
import sys | ||
import pathlib | ||
|
||
__version__ = '2024.2.0dev6' | ||
__version__ = (pathlib.Path(__file__).parent/"VERSION").read_text(encoding="utf-8").strip() | ||
__license__ = 'GPL v3' | ||
__author__ = 'Open Science Tools Ltd' | ||
__author_email__ = '[email protected]' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
def _branchFormatter(name): | ||
"""Receives name of this git branch (from setuptools-git-versioning) and | ||
returns the relevant release tag""" | ||
# see https://setuptools-git-versioning.readthedocs.io/en/stable/options/branch_formatter.html | ||
print("THIS:", name) | ||
if name == "release": | ||
return "post" # so we get 2024.2.1post4+4ea4af for post-release | ||
else: | ||
return "dev" # so we get 2024.2.2dev4+4ea4af for pre-release |