Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new ConcreteCMS versions #62

Merged
merged 3 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Build
run: docker build --force-rm --rm --tag ghcr.io/concrete5-community/docker5:base ./base
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
coverage: none
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Generate matrix
id: generate-matrix
Expand All @@ -147,7 +147,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Download base image
if: needs.check_envoronment.outputs.action == 'build'
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/check-latest-version
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ function main(): void
$localVersions = readDataFile($dataFile);
$onlineVersions = [];
foreach (DOWNLOADS_URLS as $downloadsUrl => $linkFormat) {
$doc = fetchDoc($downloadsUrl);
$onlineVersions += extractOnlineVersions($doc, $downloadsUrl, $linkFormat);
$onlineVersions += extractOnlineVersions($downloadsUrl, $linkFormat);
}
uksort(
$onlineVersions,
static fn (string $a, string $b): int => version_compare($b, $a)
);
foreach ($onlineVersions as $version => $url) {
if (isset($localVersions[$version])) {
$localVersions[$version] = $url;
}
}
$newOnlineVersions = filterOnlineVersions($onlineVersions, array_keys($localVersions));
if ($newOnlineVersions === []) {
echo 'No new online versions found';
Expand Down Expand Up @@ -118,8 +122,9 @@ function fetchDoc(string $downloadsUrl): DOMDocument
return $doc;
}

function extractOnlineVersions(DOMDocument $doc, string $downloadsUrl, int $linkFormat): array
function extractOnlineVersions(string $downloadsUrl, int $linkFormat): array
{
$doc = fetchDoc($downloadsUrl);
$result = [];
$xpath = new DOMXpath($doc);
foreach ($xpath->query('/html/body//a') as $link) {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-latest-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
-
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ongoing-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
coverage: none
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Generate matrix
id: generate-matrix
Expand All @@ -42,7 +42,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
-
Expand Down
31 changes: 16 additions & 15 deletions data/versions.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"5.7.5.13": "https://marketplace.concretecms.com/download_file/-/view/93075/8497/",
"8.5.2": "https://marketplace.concretecms.com/download_file/-/view/111592/8497/",
"8.5.4": "https://marketplace.concretecms.com/download_file/-/view/113632/8497/",
"8.5.5": "https://marketplace.concretecms.com/download_file/-/view/115589/",
"8.5.6": "https://www.concretecms.com/download_file/61dab82f-fb01-47bc-8cf1-deffff890224",
"8.5.7": "https://www.concretecms.org/download_file/ae9cca19-d76c-458e-a63a-ce9b7b963e1d",
"8.5.12": "https://www.concretecms.org/download_file/2bba0898-1539-48ff-b273-0cbddc7588da",
"5.7.5.13": "https://marketplace.concretecms.com/files/4914/8193/0463/concrete5.7.5.13.zip",
"8.5.2": "https://www.concretecms.org/download_file/7dd0a8d7-569d-4b9e-9093-1604b80794d7/2718",
"8.5.4": "https://www.concretecms.org/download_file/1cf0528b-3e20-48ac-9250-b9f08be4d3aa/2718",
"8.5.5": "https://www.concretecms.org/download_file/3abec4a4-1a45-489c-9fe7-bb3f100dea99/2718",
"8.5.6": "https://www.concretecms.org/download_file/61dab82f-fb01-47bc-8cf1-deffff890224/2718",
"8.5.7": "https://www.concretecms.org/download_file/ae9cca19-d76c-458e-a63a-ce9b7b963e1d/2718",
"8.5.12": "https://www.concretecms.org/download_file/2bba0898-1539-48ff-b273-0cbddc7588da/2718",
"8.5.13": "https://www.concretecms.org/download_file/5339037b-bd89-42e8-867a-2d30d7f5fa6d/2718",
"8.5.14": "https://www.concretecms.org/download_file/a7572f6c-7390-4252-a04d-76c209f377b0/2718",
"8.5.15": "https://www.concretecms.org/download_file/75ae96a5-44f9-486f-b6b9-d0af605020f6/2718",
"8.5.16": "https://www.concretecms.org/download_file/d8e4d0d6-cea1-4778-8bfb-4fa0b3fb31c0/2718",
"8.5.17": "https://www.concretecms.org/download_file/a7bfc016-9d13-4468-bf91-8605b957a644/2718",
"8.5.x": "https://github.com/concretecms/concretecms/archive/8.5.x.tar.gz",
"9.0.1": "https://www.concretecms.org/download_file/dc6d0589-6639-40ac-8c21-8f9f025b7e34",
"9.0.2": "https://www.concretecms.org/download_file/3254ddbf-35f0-4c92-8ed1-1fb6b9c0f0d4",
"9.1.0": "https://www.concretecms.com/download_file/fc6337ea-3e83-4cb6-b6a0-bd292fe2e2a8",
"9.1.1": "https://www.concretecms.com/download_file/c8c925b8-9a63-4b23-aff3-cb0e76a0e168/",
"9.1.2": "https://www.concretecms.com/download_file/e005c931-9ee3-4fb7-895f-760bb01f2c4d/",
"9.1.3": "https://www.concretecms.com/download_file/f7867cc1-3cbd-45b6-8df7-66ea2151eda0",
"9.2.0": "https://www.concretecms.com/download_file/277af433-97d4-4817-b48c-a758cd8adf96",
"9.2.1": "https://www.concretecms.com/download_file/71434b78-374b-4283-8d7d-da4fea982a13",
"9.0.1": "https://www.concretecms.org/download_file/dc6d0589-6639-40ac-8c21-8f9f025b7e34/2718",
"9.0.2": "https://www.concretecms.org/download_file/3254ddbf-35f0-4c92-8ed1-1fb6b9c0f0d4/2718",
"9.1.0": "https://www.concretecms.org/download_file/fc6337ea-3e83-4cb6-b6a0-bd292fe2e2a8/2718",
"9.1.1": "https://www.concretecms.org/download_file/c8c925b8-9a63-4b23-aff3-cb0e76a0e168/2718",
"9.1.2": "https://www.concretecms.org/download_file/e005c931-9ee3-4fb7-895f-760bb01f2c4d/2718",
"9.1.3": "https://www.concretecms.org/download_file/f7867cc1-3cbd-45b6-8df7-66ea2151eda0/2718",
"9.2.0": "https://www.concretecms.org/download_file/277af433-97d4-4817-b48c-a758cd8adf96/2718",
"9.2.1": "https://www.concretecms.org/download_file/71434b78-374b-4283-8d7d-da4fea982a13/2718",
"9.2.2": "https://www.concretecms.org/download_file/71d5bfc7-c1cd-46c0-a3ea-dda9ed2b3908/2718",
"9.2.3": "https://www.concretecms.org/download_file/067e9ed7-4a41-4e9f-8c45-a614aacc15d7/2718",
"9.2.4": "https://www.concretecms.org/download_file/9cbfcc11-37cc-433e-b18d-e57adb5c1c9f/2718",
Expand All @@ -29,5 +29,6 @@
"9.2.8": "https://www.concretecms.org/download_file/bc98ec39-d1d7-4727-a132-769661669f67/2718",
"9.2.9": "https://www.concretecms.org/download_file/fb83905c-0a7e-4add-bc9d-e377f2b65415/2718",
"9.2.x": "https://github.com/concretecms/concretecms/archive/9.2.x.tar.gz",
"9.3.2": "https://www.concretecms.org/download_file/840b2424-2da6-479a-808c-fb79aa77755e/2718",
"9.3.x": "https://github.com/concretecms/concretecms/archive/9.3.x.tar.gz"
}
Loading