Skip to content

Commit

Permalink
Duplicate azure commands to push info to web container
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed May 30, 2024
1 parent 765f66a commit 58cea8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/upload-backlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ async function main() {


exec(`az storage blob upload-batch --source releases/ --destination cdn`)
exec(`az storage blob upload-batch --source releases/ --destination '$web' --destination-path cdn/`)

step("Done!");
}
Expand Down
4 changes: 4 additions & 0 deletions upload-assets-to-blob-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,18 @@ function main() {
}

exec(`az storage blob upload-batch --auth-mode login --source releases/ --destination cdn --overwrite`);
exec(`az storage blob upload-batch --auth-mode login --source releases/ --destination '$web' --destination-path cdn/ --overwrite`);

step("Updating an index");
// Make sure we have some kind of index
const isPreRelease = safeTypeScriptPackage.includes("-");
const filename = isPreRelease ? "pre-releases.json" : "releases.json";

exec(`az storage blob download --auth-mode login --container-name indexes --name ${filename} --file ${filename}`);
// exec(`az storage blob download --auth-mode login --container-name '$web' --name indexes/${filename} --file ${filename}`);
exec(`json -I -f ${filename} -e "this.versions = Array.from(new Set([...this.versions, '${safeTypeScriptPackage}'])).sort()"`);
exec.continueOnError(`az storage blob upload --auth-mode login --file ${filename} --container-name indexes --name ${filename} --overwrite`);
exec.continueOnError(`az storage blob upload --auth-mode login --file ${filename} --container-name '$web' --name indexes/${filename} --overwrite`);

// Update the next.json to be the latest _known_ nightly build of TS
if (isPreRelease) {
Expand All @@ -55,6 +58,7 @@ function main() {
const latest = devReleases.pop();
writeFileSync("releases/next.json", JSON.stringify({ version: latest }));
exec.continueOnError(`az storage blob upload --auth-mode login --file "releases/next.json" --container-name indexes --name "next.json" --overwrite`);
exec.continueOnError(`az storage blob upload --auth-mode login --file "releases/next.json" --container-name '$web' --name "indexes/next.json" --overwrite`);
}


Expand Down

0 comments on commit 58cea8b

Please sign in to comment.