Skip to content

Commit 604ad29

Browse files
committed
Merge main into ci - resolve conflicts by keeping postgresql-test.yml workflow
2 parents 47c3411 + 3f24f76 commit 604ad29

2 files changed

Lines changed: 86 additions & 40 deletions

File tree

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

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ jobs:
7979
module_name = os.environ['MODULE_NAME']
8080
github_token = os.environ['GITHUB_TOKEN']
8181
82+
# Strip module name prefix from tag if present (e.g., "postgresql-2025.11.22" -> "2025.11.22")
83+
if release_tag.lower().startswith(f"{module_name.lower()}-"):
84+
original_tag = release_tag
85+
release_tag = release_tag[len(module_name)+1:]
86+
print(f"Stripped module prefix from tag: {original_tag} -> {release_tag}")
87+
8288
print(f"Processing release: {release_tag}")
8389
print(f"Module name: {module_name}")
8490
@@ -106,8 +112,15 @@ jobs:
106112
if filename.endswith('.7z'):
107113
download_url = asset['browser_download_url']
108114
109-
# Extract version number (flexible pattern)
110-
version_match = re.search(r'(\d+\.\d+\.\d+(?:\.\d+)?)', filename)
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
118+
# The (?=-\d{4}\.|\.7z) ensures we stop before a date pattern or .7z extension
119+
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|$)',
121+
filename,
122+
re.IGNORECASE
123+
)
111124
if version_match:
112125
ver = version_match.group(1)
113126
assets.append({
@@ -151,6 +164,33 @@ jobs:
151164
key, value = line.split('=', 1)
152165
properties[key.strip()] = value.strip()
153166
167+
# Fix malformed version entries by re-extracting correct versions from URLs
168+
# This handles cases like "2025.7.2.7" or "18.1-2025" that should be "18.1"
169+
fixed_properties = OrderedDict()
170+
for key, url in properties.items():
171+
# Try to extract the correct version from the URL
172+
# URL format: .../bearsampp-postgresql-18.1-2025.7.2.7z
173+
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|/|$)',
175+
url,
176+
re.IGNORECASE
177+
)
178+
179+
if url_version_match:
180+
correct_version = url_version_match.group(1)
181+
# If the key is malformed (date-like or has trailing year), fix it
182+
if re.match(r'^20\d{2}\.', key) or re.search(r'-20\d{2}$', key):
183+
print(f"Fixing malformed entry: {key} -> {correct_version}")
184+
fixed_properties[correct_version] = url
185+
else:
186+
# Keep valid entries as-is
187+
fixed_properties[key] = url
188+
else:
189+
# If we can't extract version from URL, keep the original entry
190+
fixed_properties[key] = url
191+
192+
properties = fixed_properties
193+
154194
# Add new versions
155195
for asset in assets:
156196
ver = asset['version']

releases.properties

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,46 @@
1+
18.1 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.11.22/bearsampp-postgresql-18.1-2025.7.2.7z
2+
17.7 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.11.22/bearsampp-postgresql-17.7-2025.7.2.7z
3+
17.5 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.7.2/bearsampp-postgresql-17.5-2025.7.2.7z
4+
17.4 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.2.21/bearsampp-postgresql-17.4-2025.2.21.7z
5+
17.2.3 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.2.13/bearsampp-postgresql-17.2.3-2025.2.13.7z
6+
17.2.1 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.12.1/bearsampp-postgresql-17.2.1-2024.12.1.7z
7+
17.0-RC1 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.9.18/bearsampp-postgresql-17.0-RC1-2024.9.18.7z
8+
16.11 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.11.22/bearsampp-postgresql-16.11-2025.7.2.7z
9+
16.9 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.7.2/bearsampp-postgresql-16.9-2025.7.2.7z
10+
16.8 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.2.21/bearsampp-postgresql-16.8-2025.2.21.7z
11+
16.4 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.9.18/bearsampp-postgresql-16.4-2024.9.18.7z
12+
16.2 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.4.16/bearsampp-postgresql-16.2-2024.4.16.7z
13+
16.0 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.10.9/bearsampp-postgresql-16.0-2023.10.9.7z
14+
15.15 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.11.22/bearsampp-postgresql-15.15-2025.7.2.7z
15+
15.13 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.7.2/bearsampp-postgresql-15.13-2025.7.2.7z
16+
15.12 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.2.21/bearsampp-postgresql-15.12-2025.2.21.7z
17+
15.6 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.4.16/bearsampp-postgresql-15.6-2024.4.16.7z
18+
15.4 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.10.9/bearsampp-postgresql-15.4-2023.10.9.7z
19+
15.3 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.7.23/bearsampp-postgresql-15.3-2023.7.23.7z
20+
15.2 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.4.20/bearsampp-postgresql-15.2-2023.4.24.7z
21+
15.0 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.10.28/bearsampp-postgresql-15.0-2022.10.28.7z
22+
14.20 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.11.22/bearsampp-postgresql-14.20-2025.7.2.7z
23+
14.18 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.7.2/bearsampp-postgresql-14.18-2025.7.2.7z
24+
14.17 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.2.21/bearsampp-postgresql-14.17-2025.2.21.7z
25+
14.11 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.4.16/bearsampp-postgresql-14.11-2024.4.16.7z
26+
14.9 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.10.9/bearsampp-postgresql-14.9-2023.10.9.7z
27+
14.8 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.7.23/bearsampp-postgresql-14.8-2023.7.23.7z
28+
14.7 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.4.20/bearsampp-postgresql-14.7-2023.4.24.7z
29+
14.5 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.08.28/bearsampp-postgresql-14.5-2022.08.28.7z
30+
14.4 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.08.04/bearsampp-postgresql-14.4-2022.08.04.7z
31+
13.23 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.11.22/bearsampp-postgresql-13.23-2025.7.2.7z
32+
13.21 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.7.2/bearsampp-postgresql-13.21-2025.7.2.7z
33+
13.20 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.2.21/bearsampp-postgresql-13.20-2025.2.21.7z
34+
13.14 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.4.16/bearsampp-postgresql-13.14-2024.4.16.7z
35+
13.12 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.10.9/bearsampp-postgresql-13.12-2023.10.9.7z
36+
13.11 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.7.23/bearsampp-postgresql-13.11-2023.7.23.7z
37+
13.8 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.08.28/bearsampp-postgresql-13.8-2022.08.04.7z
38+
13.7 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.08.04/bearsampp-postgresql-13.7-2022.08.04.7z
39+
12.18 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.4.16/bearsampp-postgresql-12.18-2024.4.16.7z
40+
12.16 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.10.9/bearsampp-postgresql-12.16-2023.10.9.7z
41+
12.15 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.7.23/bearsampp-postgresql-12.15-2023.7.23.7z
42+
12.12 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.08.28/bearsampp-postgresql-12.12-2022.08.04.7z
143
11.21 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.10.9/bearsampp-postgresql-11.21-2023.10.9.7z
2-
11.3 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.07.16/bearsampp-postgresql-11.3-2022.07.16.7z
3-
11.17 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.08.28/bearsampp-postgresql-11.17-2022.08.04.7z
444
11.20 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.7.23/bearsampp-postgresql-11.20-2023.7.23.7z
5-
12.12 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.08.28/bearsampp-postgresql-12.12-2022.08.04.7z
6-
12.15 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.7.23/bearsampp-postgresql-12.15-2023.7.23.7z
7-
12.16 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.10.9/bearsampp-postgresql-12.16-2023.10.9.7z
8-
12.18 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.4.16/bearsampp-postgresql-12.18-2024.4.16.7z
9-
13.7 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.08.04/bearsampp-postgresql-13.7-2022.08.04.7z
10-
13.8 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.08.28/bearsampp-postgresql-13.8-2022.08.04.7z
11-
13.11 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.7.23/bearsampp-postgresql-13.11-2023.7.23.7z
12-
13.12 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.10.9/bearsampp-postgresql-13.12-2023.10.9.7z
13-
13.14 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.4.16/bearsampp-postgresql-13.14-2024.4.16.7z
14-
13.20 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.2.21/bearsampp-postgresql-13.20-2025.2.21.7z
15-
13.21 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.7.2/bearsampp-postgresql-13.21-2025.7.2.7z
16-
14.4 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.08.04/bearsampp-postgresql-14.4-2022.08.04.7z
17-
14.5 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.08.28/bearsampp-postgresql-14.5-2022.08.28.7z
18-
14.7 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.4.20/bearsampp-postgresql-14.7-2023.4.24.7z
19-
14.8 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.7.23/bearsampp-postgresql-14.8-2023.7.23.7z
20-
14.9 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.10.9/bearsampp-postgresql-14.9-2023.10.9.7z
21-
14.11 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.4.16/bearsampp-postgresql-14.11-2024.4.16.7z
22-
14.17 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.2.21/bearsampp-postgresql-14.17-2025.2.21.7z
23-
14.18 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.7.2/bearsampp-postgresql-14.18-2025.7.2.7z
24-
15.0 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.10.28/bearsampp-postgresql-15.0-2022.10.28.7z
25-
15.2 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.4.20/bearsampp-postgresql-15.2-2023.4.24.7z
26-
15.3 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.7.23/bearsampp-postgresql-15.3-2023.7.23.7z
27-
15.4 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.10.9/bearsampp-postgresql-15.4-2023.10.9.7z
28-
15.6 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.4.16/bearsampp-postgresql-15.6-2024.4.16.7z
29-
15.12 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.2.21/bearsampp-postgresql-15.12-2025.2.21.7z
30-
15.13 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.7.2/bearsampp-postgresql-15.13-2025.7.2.7z
31-
16.0 = https://github.com/Bearsampp/module-postgresql/releases/download/2023.10.9/bearsampp-postgresql-16.0-2023.10.9.7z
32-
16.2 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.4.16/bearsampp-postgresql-16.2-2024.4.16.7z
33-
16.4 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.9.18/bearsampp-postgresql-16.4-2024.9.18.7z
34-
16.8 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.2.21/bearsampp-postgresql-16.8-2025.2.21.7z
35-
16.9 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.7.2/bearsampp-postgresql-16.9-2025.7.2.7z
36-
17.0-RC1 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.9.18/bearsampp-postgresql-17.0-RC1-2024.9.18.7z
37-
17.2.1 = https://github.com/Bearsampp/module-postgresql/releases/download/2024.12.1/bearsampp-postgresql-17.2.1-2024.12.1.7z
38-
17.2.3 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.2.13/bearsampp-postgresql-17.2.3-2025.2.13.7z
39-
17.4 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.2.21/bearsampp-postgresql-17.4-2025.2.21.7z
40-
17.5 = https://github.com/Bearsampp/module-postgresql/releases/download/2025.7.2/bearsampp-postgresql-17.5-2025.7.2.7z
45+
11.17 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.08.28/bearsampp-postgresql-11.17-2022.08.04.7z
46+
11.3 = https://github.com/Bearsampp/module-postgresql/releases/download/2022.07.16/bearsampp-postgresql-11.3-2022.07.16.7z

0 commit comments

Comments
 (0)