Skip to content

Commit 0d516b8

Browse files
committed
🔄 synced local '.github/workflows/update-releases-properties.yml' with remote '.releases/update-releases-properties.yml'
1 parent 39d8981 commit 0d516b8

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

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

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,13 @@ jobs:
106106
# Extract assets that end with .7z only
107107
assets = []
108108
109-
# Special handling for modules where filename prefix differs from module name
110-
# For apache: files start with "httpd" instead of "apache"
111-
filename_prefix = 'httpd' if module_name == 'apache' else module_name
109+
# Use module name directly as the filename prefix
110+
filename_prefix = module_name
111+
112+
print(f"Looking for .7z files with prefix: {filename_prefix}")
113+
print(f"Available assets:")
114+
for asset in release_data.get('assets', []):
115+
print(f" - {asset['name']}")
112116
113117
for asset in release_data.get('assets', []):
114118
filename = asset['name']
@@ -117,12 +121,12 @@ jobs:
117121
if filename.endswith('.7z'):
118122
download_url = asset['browser_download_url']
119123
120-
# Extract version number after filename prefix (e.g., "bearsampp-httpd-2.4.62-2025.7.2.7z" -> "2.4.62")
124+
# Extract version number after filename prefix (e.g., "bearsampp-apache-2.4.66-2025.12.8.7z" -> "2.4.66")
121125
# Pattern: filename_prefix followed by version, then either a dash+date or .7z
122126
# Supports: 18.1, 17.2.3, 3.2.1.0, 17.0-RC1, 2.4.62
123-
# The (?=-\d{4}\.|\.7z) ensures we stop before a date pattern or .7z extension
127+
# The lookahead ensures we stop before a date pattern or .7z extension
124128
version_match = re.search(
125-
rf'{filename_prefix}-(\d+\.\d+(?:\.\d+)?(?:\.\d+)?(?:-(?:RC|beta|alpha|dev)\d*)?)(?=-\d{{4}}\.|-\d{{4}}\d{{2}}\.|\.\d+z|$)',
129+
rf'{filename_prefix}-(\d+\.\d+(?:\.\d+)?(?:\.\d+)?(?:-(?:RC|beta|alpha|dev)\d*)?)(?=-\d{{4}}\.\d{{1,2}}\.\d{{1,2}}|\.\d+z|$)',
126130
filename,
127131
re.IGNORECASE
128132
)
@@ -136,6 +140,9 @@ jobs:
136140
print(f"Found: {filename} -> Version: {ver}")
137141
else:
138142
print(f"Warning: Could not extract version from: {filename}")
143+
# Debug: print the filename for troubleshooting
144+
print(f" Filename: {filename}")
145+
print(f" Looking for prefix: {filename_prefix}")
139146
140147
if not assets:
141148
print(f"No .7z assets found in release")
@@ -174,10 +181,10 @@ jobs:
174181
fixed_properties = OrderedDict()
175182
for key, url in properties.items():
176183
# Try to extract the correct version from the URL
177-
# URL format: .../bearsampp-httpd-2.4.62-2025.7.2.7z (for apache)
178-
# URL format: .../bearsampp-postgresql-18.1-2025.7.2.7z (for other modules)
184+
# URL format: .../bearsampp-apache-2.4.66-2025.12.8.7z (for apache)
185+
# URL format: .../bearsampp-postgresql-18.1-2025.12.8.7z (for other modules)
179186
url_version_match = re.search(
180-
rf'{filename_prefix}-(\d+\.\d+(?:\.\d+)?(?:\.\d+)?(?:-(?:RC|beta|alpha|dev)\d*)?)(?=-\d{{4}}\.|-\d{{4}}\d{{2}}\.|\.\d+z|/|$)',
187+
rf'{filename_prefix}-(\d+\.\d+(?:\.\d+)?(?:\.\d+)?(?:-(?:RC|beta|alpha|dev)\d*)?)(?=-\d{{4}}\.\d{{1,2}}\.\d{{1,2}}|\.\d+z|/|$)',
181188
url,
182189
re.IGNORECASE
183190
)

0 commit comments

Comments
 (0)