Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
Bugfix/install package dependencies (#79)
Browse files Browse the repository at this point in the history
* Fix keys and wait_time parameters

* Bump InstallPackageDependencies patch version

* Update Installation Keys parameter help markdown
  • Loading branch information
aly76 authored Jul 7, 2020
1 parent 6963aea commit 1219047
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,32 @@ async function run() {
const apexcompileonlypackage:boolean=tl.getBoolInput("apexcompileonlypackage",false);
const forceinstall:boolean=tl.getBoolInput("forceinstall",false);
const working_directory: string = tl.getInput("working_directory", false);
const wait_time: string = tl.getInput("wait_time", true);


let command = `npx sfdx sfpowerkit:package:dependencies:install -u ${target_org} -v ${devhub_alias} -r -w ${wait_time}`;

let command= `npx sfdx sfpowerkit:package:dependencies:install -u ${target_org} -v ${devhub_alias} -r`
if(apexcompileonlypackage)
command+=` -a`
if(keys!=null && keys.length>0)
command+=` ${keys}`
if (apexcompileonlypackage)
command += ` -a`;
if (keys!=null && keys.length>0)
command += ` -k ${keys}`;
if (forceinstall)
command += ` -o`;

if(forceinstall)
command+=` -o`

tl.debug(command);



let child=child_process.exec(command, { cwd: working_directory,encoding: "utf8" },(error,stdout,stderr)=>{

if(error)
throw error;
});

child.stdout.on("data",data=>{console.log(data.toString()); });

await onExit(child);


} catch (err) {
tl.setResult(tl.TaskResult.Failed, err.message);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sfpowerscripts-installpackagedependencies-task",
"description": "sfpowerscripts-installpackagedependencies-task",
"version": "4.0.4",
"version": "4.0.5",
"private": true,
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version": {
"Major": 4,
"Minor": 0,
"Patch": 4
"Patch": 5
},
"runsOn": [
"Agent"
Expand Down Expand Up @@ -38,7 +38,7 @@
"label": "Installation Keys",
"defaultValue": "",
"required": false,
"helpMarkDown": "installation key for key-protected packages (format is 1:MyPackage1Key 2: 3:MyPackage3Key... to allow some packages without installation key)"
"helpMarkDown": "installation key for key-protected packages (format is packagename:key e.g. core:key nCino:key vlocity:key)"
},
{
"name": "apexcompileonlypackage",
Expand All @@ -63,11 +63,19 @@
"defaultValue": "",
"required": false,
"helpMarkDown": "The working directory should contain a sfdx-project.json for this command to succeed"
},
{
"name": "wait_time",
"type": "string",
"label": "Wait Time",
"defaultValue": "30",
"required": true,
"helpMarkDown": "wait time for command to finish in minutes"
}
],
"execution": {
"Node": {
"target": "lib/InstallPackageDependencies.js"
}
}
}
}

0 comments on commit 1219047

Please sign in to comment.