mirror of
https://github.com/1j01/textual-paint.git
synced 2024-09-11 15:56:03 +03:00
Distinguish development vs. production, using Git information
This commit is contained in:
parent
97bfbda1ec
commit
58daeedd16
@ -7,3 +7,10 @@ __maintainer__ = "Isaiah Odhner"
|
||||
__email__ = "isaiahodhner@gmail.com"
|
||||
__version__ = "0.1.0"
|
||||
__license__ = "MIT"
|
||||
|
||||
# Set version string when in a git repository
|
||||
# to distinguish production from development versions.
|
||||
from os.path import exists, dirname
|
||||
from subprocess import check_output
|
||||
if exists(dirname(__file__) + "/../../.git"):
|
||||
__version__ = "development " + check_output(["git", "describe", "--tags"]).strip().decode()
|
||||
|
Loading…
Reference in New Issue
Block a user