Skip to content

Commit

Permalink
Remove old blob collection use (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey authored Jun 3, 2024
1 parent cb27842 commit 8c6577e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion scripts/upload-backlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ async function main() {
step("Uploading folders to CDN")


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
6 changes: 1 addition & 5 deletions upload-assets-to-blob-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,15 @@ function main() {
exec(`cp -r monaco-editor/node_modules/typescript releases/${optionalTag}/typescript`);
}

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(`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
Expand All @@ -57,7 +54,6 @@ function main() {
const devReleases = existingReleases.filter(f => f.includes("-dev"));
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 8c6577e

Please sign in to comment.