Skip to content

Change the atlas theme copy process to get the previous tag version #1750

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

Merged
merged 1 commit into from
Jul 4, 2025
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
19 changes: 14 additions & 5 deletions automation/run-e2e/lib/update-test-project.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
try {
await streamPipe((await fetchWithReport(url)).body, createWriteStream(downloadPath));
crossZip.unzipSync(downloadPath, extractPath);
} catch (e) {

Check warning on line 38 in automation/run-e2e/lib/update-test-project.mjs

View workflow job for this annotation

GitHub Actions / Run code quality check

'e' is defined but never used
throw new Error(`Unable to download and extract from ${url}`);
} finally {
rm("-f", downloadPath);
Expand Down Expand Up @@ -64,19 +64,28 @@
}

cp("-r", themeSourcePath, config.testProjectDir);

// Fix file permissions to ensure Docker can write to theme files
// The Atlas theme files are copied with read-only permissions
// but mxbuild needs to write to some generated files during build
sh.exec(`chmod -R +w "${config.testProjectDir}/themesource"`, { silent: true });
}

async function updateAtlasTheme() {
console.log("Copying Atlas theme files from latest Atlas UI theme release");

rm("-rf", "tests/testProject/theme");

const release = await getLatestReleaseByName("Atlas UI - Theme Folder Files", config.atlasCoreReleaseUrl);

if (!release) {
throw new Error("Can't fetch latest Atlas UI theme release");
// Fetch the specific release by tag from GitHub API
const tag = "atlasui-theme-files-2024-01-25";
const releaseResponse = await fetchGithubRestAPI(`${config.atlasCoreReleaseUrl}/tags/${tag}`);
if (!releaseResponse.ok) {
throw new Error(`Can't fetch release for tag: ${tag}`);
}
const release = await releaseResponse.json();
if (!release.assets || release.assets.length === 0) {
throw new Error(`No assets found for release tag: ${tag}`);
}

const [{ browser_download_url }] = release.assets;
const downloadedPath = join(await usetmp(), config.nameForDownloadedAtlasTheme);
const outPath = await usetmp();
Expand Down
2 changes: 1 addition & 1 deletion automation/run-e2e/mendix-versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"latest": "10.21.1.64969",
"latest": "10.24.0.73019",
"9": "9.24.0.2965",
"8": "8.18.24.2858"
}
Loading