-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use dunamai to display versioning information (#831)
makes use of the dunamai package to display versioning information (`popper version`). In addition, this commit adds a `--version` flag to the `popper` command. fixes #783
- Loading branch information
1 parent
e739b60
commit 9bbbe33
Showing
6 changed files
with
32 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ popper_status | |
popper_logs | ||
popper_status | ||
.pipeline_cache.yml | ||
cli/popper/_version.py |
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 |
---|---|---|
@@ -1 +1,21 @@ | ||
__version__ = "2.6.0-dev" | ||
import importlib | ||
import pathlib | ||
import os | ||
|
||
|
||
# check if dunamai is available | ||
dunamai_spec = importlib.util.find_spec("dunamai") | ||
dunamai_found = dunamai_spec is not None | ||
if dunamai_found: | ||
# if dunamai is found, then we use it to display the version | ||
import dunamai | ||
|
||
__version__ = dunamai.Version.from_any_vcs().serialize() | ||
_ver = f'__popper_version__ = "{__version__}"' | ||
|
||
_init_script_dir = pathlib.Path(__file__).parent.absolute() | ||
_version_path_ = os.path.join(_init_script_dir, "_version.py") | ||
with open(_version_path_, "w") as v: | ||
v.write(_ver) | ||
else: | ||
from popper._version import __popper_version__ as __version__ |
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 @@ | ||
__popper_version__ = "0.0.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
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