fix version information on system page
This commit is contained in:
parent
4f3e6d3765
commit
ed1f656167
@ -1,3 +1,3 @@
|
|||||||
TANDOOR_VERSION = ""
|
TANDOOR_VERSION = ""
|
||||||
TANDOOR_REF = ""
|
TANDOOR_REF = "abf8f791360b2bc4a5c7d011877668679bcbb3f2"
|
||||||
VERSION_INFO = []
|
VERSION_INFO = [{'name': 'Tandoor ', 'version': "commit abf8f791360b2bc4a5c7d011877668679bcbb3f2\nMerge: 4723a7ec fd028047\nAuthor: vabene1111 \nDate: Sun Dec 3 14:10:28 2023 +0100\n\n Merge branch 'develop'\n \n # Conflicts:\n # docs/faq.md\n", 'website': 'https://github.com/TandoorRecipes/recipes', 'commit_link': 'https://github.com/TandoorRecipes/recipes/commit/abf8f791360b2bc4a5c7d011877668679bcbb3f2', 'ref': 'abf8f791360b2bc4a5c7d011877668679bcbb3f2', 'branch': 'HEAD', 'tag': ''}]
|
14
version.py
14
version.py
@ -13,12 +13,11 @@ tandoor_hash = ''
|
|||||||
try:
|
try:
|
||||||
print('getting tandoor version')
|
print('getting tandoor version')
|
||||||
r = subprocess.check_output(['git', 'show', '-s'], cwd=BASE_DIR).decode()
|
r = subprocess.check_output(['git', 'show', '-s'], cwd=BASE_DIR).decode()
|
||||||
tandoor_branch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'], cwd=BASE_DIR).decode()
|
tandoor_branch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'], cwd=BASE_DIR).decode().replace('\n', '')
|
||||||
tandoor_hash = r.split('\n')[0].split(' ')[1]
|
tandoor_hash = r.split('\n')[0].split(' ')[1]
|
||||||
try:
|
try:
|
||||||
tandoor_tag = subprocess.check_output(['git', 'describe', '--exact-match', tandoor_hash], cwd=BASE_DIR).decode().replace('\n', '')
|
tandoor_tag = subprocess.check_output(['git', 'describe', '--exact-match', '--tags', tandoor_hash], cwd=BASE_DIR).decode().replace('\n', '')
|
||||||
except:
|
except BaseException:
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
version_info.append({
|
version_info.append({
|
||||||
@ -47,8 +46,9 @@ try:
|
|||||||
commit_hash = r.split('\n')[0].split(' ')[1]
|
commit_hash = r.split('\n')[0].split(' ')[1]
|
||||||
try:
|
try:
|
||||||
print('running describe')
|
print('running describe')
|
||||||
tag = subprocess.check_output(['git', 'describe', '--exact-match', commit_hash], cwd=os.path.join(BASE_DIR, 'recipes', 'plugins', d)).decode().replace('\n', '')
|
tag = subprocess.check_output(['git', 'describe', '--exact-match', commit_hash],
|
||||||
except:
|
cwd=os.path.join(BASE_DIR, 'recipes', 'plugins', d)).decode().replace('\n', '')
|
||||||
|
except BaseException:
|
||||||
tag = ''
|
tag = ''
|
||||||
|
|
||||||
version_info.append({
|
version_info.append({
|
||||||
@ -66,7 +66,7 @@ try:
|
|||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
print("command '{}' return with error (code {}): {}".format(e.cmd, e.returncode, e.output))
|
print("command '{}' return with error (code {}): {}".format(e.cmd, e.returncode, e.output))
|
||||||
except:
|
except BaseException:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
|
||||||
with open('cookbook/version_info.py', 'w+', encoding='UTF-8') as f:
|
with open('cookbook/version_info.py', 'w+', encoding='UTF-8') as f:
|
||||||
|
Loading…
Reference in New Issue
Block a user