Remove subprocess call
pbr version can give us this for relatively cheap. Change-Id: I7ddc1fccf926edb92058abf0a80db838ffc74c38
This commit is contained in:
parent
ef03b506e0
commit
b9e3deb8c2
@ -26,6 +26,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
import pbr.version
|
||||||
import openstackdocstheme
|
import openstackdocstheme
|
||||||
|
|
||||||
# -- OpenStack-Ansible configuration --------------------------------------
|
# -- OpenStack-Ansible configuration --------------------------------------
|
||||||
@ -46,14 +47,12 @@ title = 'OpenStack-Ansible Documentation'
|
|||||||
current_series = openstackdocstheme.ext._get_series_name()
|
current_series = openstackdocstheme.ext._get_series_name()
|
||||||
|
|
||||||
if current_series == "latest":
|
if current_series == "latest":
|
||||||
watermark = "Pre-release"
|
|
||||||
latest_tag = "master"
|
latest_tag = "master"
|
||||||
rdo_series = previous_series_name
|
rdo_series = previous_series_name
|
||||||
suse_series = previous_series_name.capitalize()
|
suse_series = previous_series_name.capitalize()
|
||||||
else:
|
else:
|
||||||
watermark = series_names = current_series.capitalize()
|
series_names = current_series.capitalize()
|
||||||
git_cmd = ["git", "describe", "--abbrev=0", "--tags"]
|
latest_tag = pbr.version.VersionInfo('osa_toolkit').__str__()
|
||||||
latest_tag = subprocess.Popen(git_cmd,stdout=subprocess.PIPE).communicate()[0].strip('\n')
|
|
||||||
rdo_series = current_series_name
|
rdo_series = current_series_name
|
||||||
suse_series = current_series_name.capitalize()
|
suse_series = current_series_name.capitalize()
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ import sys
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import openstackdocstheme
|
import openstackdocstheme
|
||||||
|
import pbr.version
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
# -- OpenStack-Ansible configuration --------------------------------------
|
# -- OpenStack-Ansible configuration --------------------------------------
|
||||||
@ -49,14 +50,12 @@ title = 'OpenStack-Ansible Documentation'
|
|||||||
current_series = openstackdocstheme.ext._get_series_name()
|
current_series = openstackdocstheme.ext._get_series_name()
|
||||||
|
|
||||||
if current_series == "latest":
|
if current_series == "latest":
|
||||||
watermark = "Pre-release"
|
|
||||||
latest_tag = "master"
|
latest_tag = "master"
|
||||||
branch = "master"
|
branch = "master"
|
||||||
upgrade_warning = "Upgrading to master is not recommended. Master is under heavy development, and is not stable."
|
upgrade_warning = "Upgrading to master is not recommended. Master is under heavy development, and is not stable."
|
||||||
else:
|
else:
|
||||||
watermark = series_names = current_series.capitalize()
|
series_names = current_series.capitalize()
|
||||||
git_cmd = ["git", "describe", "--abbrev=0", "--tags"]
|
latest_tag = pbr.version.VersionInfo('osa_toolkit').__str__()
|
||||||
latest_tag = subprocess.Popen(git_cmd,stdout=subprocess.PIPE).communicate()[0].strip('\n')
|
|
||||||
branch = "stable/{}".format(current_series)
|
branch = "stable/{}".format(current_series)
|
||||||
upgrade_warning = "The upgrade is always under active development."
|
upgrade_warning = "The upgrade is always under active development."
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user