mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 00:41:31 +00:00
Initial Move from Azure DevOps to GitHub
This commit is contained in:
24
copyToConsumers.js
Normal file
24
copyToConsumers.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const fs = require("fs-extra");
|
||||
|
||||
const dataExplorerLocalPath = process.env.BUILD_ARTIFACTSTAGINGDIRECTORY || process.env.DATAEXPLORER_PATH;
|
||||
const dataExplorerEmulatorPath = process.env.ProgramFiles + "/Azure Cosmos DB Emulator/Packages/DataExplorer";
|
||||
const newDataExplorerEmulatorPath = process.env.ProgramFiles + "/Azure Cosmos Emulator/Packages/DataExplorer";
|
||||
|
||||
console.log("Copying dist/ to portal and emulator");
|
||||
cleanAndCopy(dataExplorerLocalPath);
|
||||
cleanAndCopy(dataExplorerEmulatorPath);
|
||||
cleanAndCopy(newDataExplorerEmulatorPath);
|
||||
|
||||
function cleanAndCopy(path) {
|
||||
if (fs.existsSync(path)) {
|
||||
fs.removeSync(path);
|
||||
fs.copySync("dist", path);
|
||||
if (fs.existsSync("Contracts")) {
|
||||
fs.copySync("Contracts", path + "/contracts");
|
||||
} else {
|
||||
console.log("Contracts folder does not exist. Doing nothing.");
|
||||
}
|
||||
} else {
|
||||
console.log(`Path: "${path}" does not exist. Doing nothing.`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user