@@ -105,19 +105,24 @@ jobs:
105105
106106 # Extract assets that end with .7z only
107107 assets = []
108+
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
112+
108113 for asset in release_data.get('assets', []):
109114 filename = asset['name']
110115
111116 # Check if file ends with .7z
112117 if filename.endswith('.7z'):
113118 download_url = asset['browser_download_url']
114119
115- # Extract version number after module name (e.g., "bearsampp-postgresql-18.1 -2025.7.2.7z" -> "18.1 ")
116- # Pattern: module_name followed by version, then either a dash+date or .7z
117- # Supports: 18.1, 17.2.3, 3.2.1.0, 17.0-RC1
120+ # Extract version number after filename prefix (e.g., "bearsampp-httpd-2.4.62 -2025.7.2.7z" -> "2.4.62 ")
121+ # Pattern: filename_prefix followed by version, then either a dash+date or .7z
122+ # Supports: 18.1, 17.2.3, 3.2.1.0, 17.0-RC1, 2.4.62
118123 # The (?=-\d{4}\.|\.7z) ensures we stop before a date pattern or .7z extension
119124 version_match = re.search(
120- rf'{module_name }-(\d+\.\d+(?:\.\d+)?(?:\.\d+)?(?:-(?:RC|beta|alpha|dev)\d*)?)(?=-\d{{4}}\.|-\d{{4}}\d{{2}}\.|\.\d+z|$)',
125+ rf'{filename_prefix }-(\d+\.\d+(?:\.\d+)?(?:\.\d+)?(?:-(?:RC|beta|alpha|dev)\d*)?)(?=-\d{{4}}\.|-\d{{4}}\d{{2}}\.|\.\d+z|$)',
121126 filename,
122127 re.IGNORECASE
123128 )
@@ -169,9 +174,10 @@ jobs:
169174 fixed_properties = OrderedDict()
170175 for key, url in properties.items():
171176 # Try to extract the correct version from the URL
172- # URL format: .../bearsampp-postgresql-18.1-2025.7.2.7z
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)
173179 url_version_match = re.search(
174- rf'{module_name }-(\d+\.\d+(?:\.\d+)?(?:\.\d+)?(?:-(?:RC|beta|alpha|dev)\d*)?)(?=-\d{{4}}\.|-\d{{4}}\d{{2}}\.|\.\d+z|/|$)',
180+ rf'{filename_prefix }-(\d+\.\d+(?:\.\d+)?(?:\.\d+)?(?:-(?:RC|beta|alpha|dev)\d*)?)(?=-\d{{4}}\.|-\d{{4}}\d{{2}}\.|\.\d+z|/|$)',
175181 url,
176182 re.IGNORECASE
177183 )
0 commit comments