Skip to content

Commit

Permalink
Github version change on update_package.py
Browse files Browse the repository at this point in the history
  • Loading branch information
naacbin committed Jun 1, 2024
1 parent 165ec34 commit ed2808c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/utils/update_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ def update_github_url(package):
# Use findall as some packages have two urls (for 32 and 64 bits), we need to update both
# Match urls like https://github.com/mandiant/capa/releases/download/v4.0.1/capa-v4.0.1-windows.zip
matches = re.findall(
"[\"'](?P<url>https://github.com/(?P<org>[^/]+)/(?P<project>[^/]+)/releases/download/(?P<version>[^/]+)/[^\"']+)[\"']",
"[\"'](?P<url>https://github.com/(?P<org>[^/]+)/(?P<project>[^/]+)/releases/download/v?(?P<version>[^/]+)/[^\"']+)[\"']",
content,
)
# Match also urls like https://github.com/joxeankoret/diaphora/archive/refs/tags/3.0.zip
matches += re.findall(
"[\"'](?P<url>https://github.com/(?P<org>[^/]+)/(?P<project>[^/]+)/archive/refs/tags/(?P<version>[^/]+).zip)[\"']",
"[\"'](?P<url>https://github.com/(?P<org>[^/]+)/(?P<project>[^/]+)/archive/refs/tags/v?(?P<version>[^/]+).zip)[\"']",
content,
)

Expand Down

0 comments on commit ed2808c

Please sign in to comment.