Skip to content

Commit

Permalink
Merge branch 'develop' into e2e/settings-about-metamask-links-test
Browse files Browse the repository at this point in the history
  • Loading branch information
hjetpoluru authored Feb 23, 2024
2 parents d4f8e52 + 7a8e35c commit 178e84c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .devcontainer/download-builds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async function downloadBuilds(builds: any[]) {
console.log(
'No builds found on CircleCI for the current branch, you will have to build the Extension yourself',
);
return;
return false;
}

const buildPromises = [] as Promise<any>[];
Expand All @@ -101,6 +101,8 @@ async function downloadBuilds(builds: any[]) {
await Promise.all(buildPromises);

console.log('downloads complete');

return true;
}

function unzipBuilds(folder: 'builds' | 'builds-test', versionNumber: string) {
Expand All @@ -111,7 +113,7 @@ function unzipBuilds(folder: 'builds' | 'builds-test', versionNumber: string) {
if (process.platform === 'win32') {
execSync(`rmdir /s /q dist & mkdir dist\\chrome & mkdir dist\\firefox`);
} else {
execSync('sudo rm -rf dist && mkdir -p dist');
execSync('rm -rf dist && mkdir -p dist');
}

for (const browser of ['chrome', 'firefox']) {
Expand All @@ -136,12 +138,14 @@ async function main(jobNames: string[]) {

console.log('builds', builds);

await downloadBuilds(builds);
const downloadWorked = await downloadBuilds(builds);

const versionNumber = getVersionNumber(builds);
const folder = builds[0].path.split('/')[0];
if (downloadWorked) {
const versionNumber = getVersionNumber(builds);
const folder = builds[0].path.split('/')[0];

unzipBuilds(folder, versionNumber);
unzipBuilds(folder, versionNumber);
}
}

let args = process.argv.slice(2);
Expand Down

0 comments on commit 178e84c

Please sign in to comment.