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 subprocess
|
||||
|
||||
import pbr.version
|
||||
import openstackdocstheme
|
||||
|
||||
# -- OpenStack-Ansible configuration --------------------------------------
|
||||
@ -46,14 +47,12 @@ title = 'OpenStack-Ansible Documentation'
|
||||
current_series = openstackdocstheme.ext._get_series_name()
|
||||
|
||||
if current_series == "latest":
|
||||
watermark = "Pre-release"
|
||||
latest_tag = "master"
|
||||
rdo_series = previous_series_name
|
||||
suse_series = previous_series_name.capitalize()
|
||||
else:
|
||||
watermark = series_names = current_series.capitalize()
|
||||
git_cmd = ["git", "describe", "--abbrev=0", "--tags"]
|
||||
latest_tag = subprocess.Popen(git_cmd,stdout=subprocess.PIPE).communicate()[0].strip('\n')
|
||||
series_names = current_series.capitalize()
|
||||
latest_tag = pbr.version.VersionInfo('osa_toolkit').__str__()
|
||||
rdo_series = current_series_name
|
||||
suse_series = current_series_name.capitalize()
|
||||
|
||||
|
@ -29,6 +29,7 @@ import sys
|
||||
import subprocess
|
||||
|
||||
import openstackdocstheme
|
||||
import pbr.version
|
||||
import yaml
|
||||
|
||||
# -- OpenStack-Ansible configuration --------------------------------------
|
||||
@ -49,14 +50,12 @@ title = 'OpenStack-Ansible Documentation'
|
||||
current_series = openstackdocstheme.ext._get_series_name()
|
||||
|
||||
if current_series == "latest":
|
||||
watermark = "Pre-release"
|
||||
latest_tag = "master"
|
||||
branch = "master"
|
||||
upgrade_warning = "Upgrading to master is not recommended. Master is under heavy development, and is not stable."
|
||||
else:
|
||||
watermark = series_names = current_series.capitalize()
|
||||
git_cmd = ["git", "describe", "--abbrev=0", "--tags"]
|
||||
latest_tag = subprocess.Popen(git_cmd,stdout=subprocess.PIPE).communicate()[0].strip('\n')
|
||||
series_names = current_series.capitalize()
|
||||
latest_tag = pbr.version.VersionInfo('osa_toolkit').__str__()
|
||||
branch = "stable/{}".format(current_series)
|
||||
upgrade_warning = "The upgrade is always under active development."
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user