mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
fixed lookup
This commit is contained in:
parent
0d076eaea8
commit
52d7ff0f65
@ -14,6 +14,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
@ -91,8 +92,6 @@ def check_version_number(version_string, allow_duplicate=False):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
here = os.path.abspath(os.path.dirname(__file__))
|
|
||||||
|
|
||||||
# GITHUB_REF_TYPE may be either 'branch' or 'tag'
|
# GITHUB_REF_TYPE may be either 'branch' or 'tag'
|
||||||
GITHUB_REF_TYPE = os.environ['GITHUB_REF_TYPE']
|
GITHUB_REF_TYPE = os.environ['GITHUB_REF_TYPE']
|
||||||
|
|
||||||
@ -118,7 +117,7 @@ if __name__ == '__main__':
|
|||||||
text = f.read()
|
text = f.read()
|
||||||
|
|
||||||
# Extract the InvenTree software version
|
# Extract the InvenTree software version
|
||||||
results = re.findall(r'INVENTREE_SW_VERSION = "(.*)"', text)
|
results = re.findall(r"""INVENTREE_SW_VERSION = '(.*)'""", text)
|
||||||
|
|
||||||
if len(results) != 1:
|
if len(results) != 1:
|
||||||
print(f'Could not find INVENTREE_SW_VERSION in {version_file}')
|
print(f'Could not find INVENTREE_SW_VERSION in {version_file}')
|
||||||
|
Loading…
Reference in New Issue
Block a user