mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-16 12:05:53 +00:00
Add extra context to "invoke version" (#9785)
* Add extra context to "invoke version" * Reorder * Simplify * not specified * Revert spacing
This commit is contained in:
16
tasks.py
16
tasks.py
@ -1457,6 +1457,17 @@ def version(c):
|
||||
NOT_SPECIFIED = wrap_color('NOT SPECIFIED', '91')
|
||||
NA = wrap_color('N/A', '93')
|
||||
|
||||
platform = NOT_SPECIFIED
|
||||
|
||||
if is_pkg_installer():
|
||||
platform = 'Package Installer'
|
||||
elif is_docker_environment():
|
||||
platform = 'Docker'
|
||||
elif is_devcontainer_environment():
|
||||
platform = 'Devcontainer'
|
||||
elif is_rtd_environment():
|
||||
platform = 'ReadTheDocs'
|
||||
|
||||
print(
|
||||
f"""
|
||||
InvenTree - inventree.org
|
||||
@ -1484,9 +1495,8 @@ Node {node if node else NA}
|
||||
Yarn {yarn if yarn else NA}
|
||||
|
||||
Environment:
|
||||
Docker {is_docker_environment()}
|
||||
RTD {is_rtd_environment()}
|
||||
PKG {is_pkg_installer()}
|
||||
Platform {platform}
|
||||
Debug {is_debug_environment()}
|
||||
|
||||
Commit hash: {InvenTreeVersion.inventreeCommitHash()}
|
||||
Commit date: {InvenTreeVersion.inventreeCommitDate()}"""
|
||||
|
Reference in New Issue
Block a user