mirror of
https://github.com/ansible/awx.git
synced 2026-01-31 17:18:59 -03:30
Updates to versioning system.
https://github.com/ansible/awx/issues?q=%22--first-parent%22
This commit is contained in:
9
setup.py
9
setup.py
@@ -22,13 +22,8 @@ docdir = "/usr/share/doc/awx"
|
||||
def get_version():
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
version_file = os.path.join(current_dir, 'VERSION')
|
||||
if os.path.isfile(version_file):
|
||||
with open(version_file, 'r') as file:
|
||||
version = file.read().strip()
|
||||
else:
|
||||
version = subprocess.Popen("git describe --long | cut -d - -f 1-1", shell=True, stdout=subprocess.PIPE).stdout.read().strip()
|
||||
return version
|
||||
|
||||
with open(version_file, 'r') as file:
|
||||
return file.read().strip()
|
||||
|
||||
if os.path.exists("/etc/debian_version"):
|
||||
sysinit = "/etc/init.d"
|
||||
|
||||
Reference in New Issue
Block a user