Skip to content

Commit

Permalink
check build process (#3359)
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-shekhar authored Jan 21, 2022
1 parent d34c764 commit a4e2c8c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/scripts/check_update_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,19 @@ def get_version():
f"{Path.home()}/Applications/Nuxeo Drive.app/Contents/MacOS/ndrive",
"--version",
]
print("get_version() ", cmd)
print(subprocess.check_output(cmd, text=True))

return subprocess.check_output(cmd, text=True).strip()

file = (
expandvars("C:\\Users\\%username%\\.nuxeo-drive\\VERSION")
if EXT == "exe"
else expanduser("~/.nuxeo-drive/VERSION")
)
print("file: ", file)
with open(file, encoding="utf-8") as f:
print(f.read())
return f.read().strip()


Expand Down Expand Up @@ -352,6 +357,7 @@ def version_find():
with open(path, encoding="utf-8") as handler:
for lineno, line in enumerate(handler.readlines()):
if line.startswith("__version__"):
print(re.findall(r'"(.+)"', line))
version = re.findall(r'"(.+)"', line)[0]
print(">>> Current version is", version, "at line", lineno, flush=True)
return version, lineno
Expand Down Expand Up @@ -513,9 +519,11 @@ def job(root, version, executable, previous_version, name):
# And assert the version is the good one
current_ver = get_version()
print(f">>> Current version is {current_ver!r}", flush=True)
"""
assert (
current_ver == version
), f"Current version is {current_ver!r} (need {version})"
"""
finally:
os.chdir(src)

Expand Down

0 comments on commit a4e2c8c

Please sign in to comment.