Skip to content

Commit 54d3948

Browse files
committed
Add explicit support for distinct MariaDB and MySQL versions.
1 parent f252c2a commit 54d3948

3 files changed

Lines changed: 58 additions & 2 deletions

File tree

.github/workflows/reusable-support-json-reader-v1.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,25 @@ jobs:
144144
VERSIONS="$( jq \
145145
-r \
146146
--arg wp_version "${WP_VERSION}" \
147-
'.[$wp_version] | @json' \
147+
'if (.[$wp_version] | type) == "object" then
148+
(.[$wp_version].mysql // [] | map("mysql:" + .)) + (.[$wp_version].mariadb // [] | map("mariadb:" + .))
149+
else
150+
(.[$wp_version] // [] | map("mysql:" + ., "mariadb:" + .))
151+
end | @json' \
148152
.version-support-mysql.json
149153
)"
150154
echo "versions=$VERSIONS" >> "$GITHUB_OUTPUT"
151155
else
152-
echo "versions=$(jq -r '.[ (keys[-1]) ] | @json' .version-support-mysql.json)" >> "$GITHUB_OUTPUT"
156+
VERSIONS="$( jq \
157+
-r \
158+
'if (.[ (keys[-1]) ] | type) == "object" then
159+
(.[ (keys[-1]) ].mysql // [] | map("mysql:" + .)) + (.[ (keys[-1]) ].mariadb // [] | map("mariadb:" + .))
160+
else
161+
(.[ (keys[-1]) ] // [] | map("mysql:" + ., "mariadb:" + .))
162+
end | @json' \
163+
.version-support-mysql.json
164+
)"
165+
echo "versions=$VERSIONS" >> "$GITHUB_OUTPUT"
153166
fi
154167
env:
155168
WP_VERSION: ${{ needs.major-wp-version.outputs.version }}

.version-support-mysql.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,38 @@
11
{
2+
"7-0": {
3+
"mariadb": [
4+
"11.8",
5+
"11.4",
6+
"10.11",
7+
"10.6",
8+
"10.5",
9+
"10.4",
10+
"10.3",
11+
"9.4",
12+
"9.3",
13+
"9.2",
14+
"9.1",
15+
"9.0",
16+
"8.4",
17+
"8.0",
18+
"5.7",
19+
"5.6",
20+
"5.5"
21+
],
22+
"mysql": [
23+
"9.5",
24+
"9.4",
25+
"9.3",
26+
"9.2",
27+
"9.1",
28+
"9.0",
29+
"8.4",
30+
"8.0",
31+
"5.7",
32+
"5.6",
33+
"5.5"
34+
]
35+
},
236
"6-9": [
337
"9.4",
438
"9.3",

.version-support-php.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
2+
"7-0": [
3+
"7.4",
4+
"8.0",
5+
"8.1",
6+
"8.2",
7+
"8.3",
8+
"8.4",
9+
"8.5"
10+
],
211
"6-9": [
312
"7.2",
413
"7.3",

0 commit comments

Comments
 (0)