mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 04:25:42 +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')
|
NOT_SPECIFIED = wrap_color('NOT SPECIFIED', '91')
|
||||||
NA = wrap_color('N/A', '93')
|
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(
|
print(
|
||||||
f"""
|
f"""
|
||||||
InvenTree - inventree.org
|
InvenTree - inventree.org
|
||||||
@ -1484,9 +1495,8 @@ Node {node if node else NA}
|
|||||||
Yarn {yarn if yarn else NA}
|
Yarn {yarn if yarn else NA}
|
||||||
|
|
||||||
Environment:
|
Environment:
|
||||||
Docker {is_docker_environment()}
|
Platform {platform}
|
||||||
RTD {is_rtd_environment()}
|
Debug {is_debug_environment()}
|
||||||
PKG {is_pkg_installer()}
|
|
||||||
|
|
||||||
Commit hash: {InvenTreeVersion.inventreeCommitHash()}
|
Commit hash: {InvenTreeVersion.inventreeCommitHash()}
|
||||||
Commit date: {InvenTreeVersion.inventreeCommitDate()}"""
|
Commit date: {InvenTreeVersion.inventreeCommitDate()}"""
|
||||||
|
Reference in New Issue
Block a user