Skip to content

Commit

Permalink
Use dedicated deploy folder
Browse files Browse the repository at this point in the history
Fixes #42
  • Loading branch information
bdukes committed Oct 22, 2021
1 parent ca68fd6 commit 80c9328
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cantarus-polydeploy-client/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const path = require("path");
const taskLib = require("azure-pipelines-task-lib/task");

const deployPath = taskLib.getPathInput("deploy-path", true, true);
Expand All @@ -8,11 +9,17 @@ const installationStatusTimeout = taskLib.getInput(
"installation-status-timeout"
);

const deployDirName = `deploy-${Date.now()}`;
const deployDirPath = path.join(taskLib.cwd(), deployDirName);
taskLib.mkdirP(deployDirPath);

taskLib.findMatch(deployPath, "**/*.zip").forEach((zipPath) => {
taskLib.debug(`Copying ${zipPath} to ${taskLib.cwd()}`);
taskLib.cp(zipPath, taskLib.cwd());
taskLib.debug(`Copying ${zipPath} to ${deployDirPath}`);
taskLib.cp(zipPath, deployDirPath);
});

taskLib.cd(deployDirPath);

let toolRunner = taskLib
.tool("DeployClient.exe")
.arg("--target-uri")
Expand Down

0 comments on commit 80c9328

Please sign in to comment.