Skip to content

Commit

Permalink
fix: autoconf version check
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Dec 4, 2023
1 parent 1ba608e commit 5983dd1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/update_native_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,17 @@ def _update_with_root(tool, dry_run):
major = {
"openssl": "3.0",
}
only = {
"autoconf": "~v?[0-9]+\.[0-9]+(\.[0-9]+)?$",
}
lines = DOCKERFILE.read_text().splitlines()
re_ = re.compile(f"^RUN export {tool.upper()}_ROOT={tool}-(?P<version>\\S+) && \\\\$")
for i in range(len(lines)):
match = re_.match(lines[i])
if match is None:
continue
current_version = Version(match["version"], char_fix_required=tool=="openssl")
latest_version = latest(repo[tool], major=major.get(tool, None))
latest_version = latest(repo[tool], major=major.get(tool, None), only=only.get(tool, None))
if latest_version > current_version:
root = f"{tool}-{latest_version}"
url = re.match(f"^ export {tool.upper()}_DOWNLOAD_URL=(?P<url>\\S+) && \\\\$", lines[i + 2])["url"]
Expand Down

0 comments on commit 5983dd1

Please sign in to comment.