Skip to content

Commit a2ddf2f

Browse files
committed
🔄 synced local '.github/workflows/update-module-properties.yml' with remote '.releases/update-module-properties.yml'
1 parent d244b02 commit a2ddf2f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎.github/workflows/update-module-properties.yml‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ jobs:
117117
if filename.endswith('.phar'):
118118
download_url = asset['browser_download_url']
119119
# Try to extract version from filename first, then fall back to release name
120-
version_match = re.search(r'(\d+(?:\.\d+)+)', filename)
120+
# Use negative lookahead to avoid matching the "7" in ".7z"
121+
version_match = re.search(r'(\d+(?:\.\d+)+)(?=[-._]|\.(?:7z|exe|zip|phar))', filename)
121122
if version_match:
122123
ver = version_match.group(1)
123124
elif release_name_version:
@@ -175,7 +176,8 @@ jobs:
175176
download_url = asset['browser_download_url']
176177
177178
# Try to extract version from filename first, then fall back to release name
178-
version_match = re.search(r'(\d+(?:\.\d+)+)', filename)
179+
# Use negative lookahead to avoid matching the "7" in ".7z"
180+
version_match = re.search(r'(\d+(?:\.\d+)+)(?=[-._]|\.(?:7z|exe|zip|phar))', filename)
179181
if version_match:
180182
ver = version_match.group(1)
181183
assets.append({
@@ -206,7 +208,8 @@ jobs:
206208
download_url = asset['browser_download_url']
207209
208210
# Try to extract version from filename first, then fall back to release name
209-
version_match = re.search(r'(\d+(?:\.\d+)+)', filename)
211+
# Use negative lookahead to avoid matching the "7" in ".7z"
212+
version_match = re.search(r'(\d+(?:\.\d+)+)(?=[-._]|\.(?:7z|exe|zip|phar))', filename)
210213
if version_match:
211214
ver = version_match.group(1)
212215
assets.append({
@@ -296,7 +299,8 @@ jobs:
296299
download_url = asset['browser_download_url']
297300
298301
# Try to extract version from filename first, then fall back to release name
299-
version_match = re.search(r'(\d+(?:\.\d+)+)', filename)
302+
# Use negative lookahead to avoid matching the "7" in ".7z"
303+
version_match = re.search(r'(\d+(?:\.\d+)+)(?=[-._]|\.(?:7z|exe|zip|phar))', filename)
300304
if version_match:
301305
ver = version_match.group(1)
302306
assets.append({

0 commit comments

Comments
 (0)