mirror of
https://github.com/ChristianLight/tutor.git
synced 2025-01-05 15:12:10 +00:00
fix: package version in nightly
The string returned by "make version" should not include the "-nightly" suffix, otherwise tests fail.
This commit is contained in:
parent
fa32269e91
commit
0500bfe9a6
2
Makefile
2
Makefile
@ -123,7 +123,7 @@ ci-bootstrap-images:
|
||||
###### Additional commands
|
||||
|
||||
version: ## Print the current tutor version
|
||||
@python -c 'import io, os; about = {}; exec(io.open(os.path.join("tutor", "__about__.py"), "rt", encoding="utf-8").read(), about); print(about["__version__"])'
|
||||
@python -c 'import io, os; about = {}; exec(io.open(os.path.join("tutor", "__about__.py"), "rt", encoding="utf-8").read(), about); print(about["__package_version__"])'
|
||||
|
||||
ESCAPE =
|
||||
help: ## Print this help
|
||||
|
2
setup.py
2
setup.py
@ -40,7 +40,7 @@ ABOUT = load_about()
|
||||
|
||||
setup(
|
||||
name="tutor",
|
||||
version=ABOUT["__version__"].split("-")[0], # drop "-nightly" suffix if present
|
||||
version=ABOUT["__package_version__"],
|
||||
url="https://docs.tutor.overhang.io/",
|
||||
project_urls={
|
||||
"Documentation": "https://docs.tutor.overhang.io/",
|
||||
|
@ -18,6 +18,11 @@ __version_suffix__ = ""
|
||||
# name.
|
||||
__app__ = os.environ.get("TUTOR_APP", "tutor")
|
||||
|
||||
# Package version, as installed by pip, does not include the version suffix.
|
||||
# Otherwise, nightly plugins will automatically install non-nightly Tutor
|
||||
# version.
|
||||
__package_version__ = __version__
|
||||
|
||||
if __version_suffix__:
|
||||
__version__ += "-" + __version_suffix__
|
||||
__app__ += "-" + __version_suffix__
|
||||
|
Loading…
Reference in New Issue
Block a user