Prevent crashing when github is not up to date yet

This commit is contained in:
Joseph Garrone 2024-02-07 21:22:58 +01:00
parent e1b52e7439
commit 4ad7183d7e
2 changed files with 17 additions and 13 deletions

View File

@ -17,7 +17,7 @@ const isSilent = true;
const logger = getLogger({ isSilent });
async function main() {
const keycloakVersion = "23.0.4";
const keycloakVersion = "11.0.3";
const tmpDirPath = pathJoin(getProjectRoot(), "tmp_xImOef9dOd44");

View File

@ -267,18 +267,22 @@ export async function downloadAndUnzip(
child_process.execSync(`npm install -g putasset`);
}
child_process.execFileSync("putasset", [
"--owner",
"keycloakify",
"--repo",
"keycloakify",
"--tag",
"v0.0.1",
"--filename",
zipFilePath,
"--token",
githubToken
]);
try {
child_process.execFileSync("putasset", [
"--owner",
"keycloakify",
"--repo",
"keycloakify",
"--tag",
"v0.0.1",
"--filename",
zipFilePath,
"--token",
githubToken
]);
} catch {
console.log("upload failed, asset probably already exists in remote cache");
}
}
}