From 2c48eaefddea2bb380c510550ec52518ef52ff85 Mon Sep 17 00:00:00 2001 From: EnderDev <42723993+EnderDev@users.noreply.github.com> Date: Thu, 15 Apr 2021 15:00:25 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=91=20Clean=20up=20unused=20scripts=20?= =?UTF-8?q?and=20deps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 -- scripts/upload-artifacts.js | 42 ------------------------------------- 2 files changed, 44 deletions(-) delete mode 100644 scripts/upload-artifacts.js diff --git a/package.json b/package.json index 72ec2717c5..278c89e298 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,6 @@ "repository": "https://github.com/dothq/browser-desktop", "license": "MPL-2.0", "dependencies": { - "@azure/identity": "^1.2.2", - "@azure/storage-blob": "^12.4.0", "@octokit/rest": "^18.3.5", "axios": "^0.21.1", "chalk": "^4.1.0", diff --git a/scripts/upload-artifacts.js b/scripts/upload-artifacts.js deleted file mode 100644 index 72b206cea4..0000000000 --- a/scripts/upload-artifacts.js +++ /dev/null @@ -1,42 +0,0 @@ -const { - BlobServiceClient -} = require("@azure/storage-blob"); -const { readFileSync } = require("fs-extra"); -const { resolve } = require("path"); - -const blobServiceClient = BlobServiceClient.fromConnectionString( - process.env.AZURE_CONNECTION_STRING -); - -const containerName = "artifacts"; - -async function main() { - const containerClient = blobServiceClient.getContainerClient( - containerName - ); - - const os = process.argv[2]; - const file = process.argv[3]; - - const data = readFileSync( - resolve(process.cwd(), file), - "utf-8" - ); - - const blobName = `browser/${os}/${ - file.split("/")[file.split("/").length - 1] - }`; - const blockBlobClient = containerClient.getBlockBlobClient( - blobName - ); - const uploadBlobResponse = await blockBlobClient.upload( - data, - data.length - ); - console.log( - `Upload block blob ${blobName} successfully`, - uploadBlobResponse.requestId - ); -} - -main();