From f839887752cdabf7d618fe5d4541285b76982e2a Mon Sep 17 00:00:00 2001 From: Wade Wegner Date: Wed, 2 Aug 2017 09:25:36 -0700 Subject: [PATCH] updated --- .profile | 2 +- app.js | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.profile b/.profile index b842b45..e0eb8ae 100644 --- a/.profile +++ b/.profile @@ -12,7 +12,7 @@ echo "Updating PATH to include Salesforce CLI ..." export PATH=$PATH:/app/.local/share/sfdx/cli/bin/ # echo "Updating Salesforce CLI plugin ..." -# sfdx update +sfdx update echo "Creating local resources ..." mkdir /app/tmp diff --git a/app.js b/app.js index 0c64783..c3cd5bd 100644 --- a/app.js +++ b/app.js @@ -159,17 +159,17 @@ app.get('/oauth/callback', (req, res) => { const router = express.Router(); -router.get('/test', (req, res) => { +// router.get('/test', (req, res) => { - const script = `ls -lA;./jq --help`; +// const script = `ls -lA;./jq --help`; - commands.run('test', script, (result) => { - res.json({ - message: result - }); - }); +// commands.run('test', script, (result) => { +// res.json({ +// message: result +// }); +// }); -}); +// }); router.post('/deploying', (req, res) => { @@ -184,7 +184,7 @@ router.post('/deploying', (req, res) => { const startingDirectory = process.env.STARTINGDIRECTORY; const directory = `${tokenName}-${timestamp}`; - const jqDirectory = '/app/.local/share/jq/bin/'; + // const jqDirectory = '/app/.local/share/jq/bin/'; let script; let sfdxurl; @@ -243,7 +243,7 @@ router.post('/deploying', (req, res) => { case 'test': - script = `${startingDirectory}cd ${directory};export FORCE_SHOW_SPINNER=;sfdx force:apex:test:run -r human --json | ${jqDirectory}jq -r .result | ${jqDirectory}jq -r .summary | ${jqDirectory}jq -r .outcome`; + script = `${startingDirectory}cd ${directory};export FORCE_SHOW_SPINNER=;sfdx force:apex:test:run -r human --json | ./jq -r .result | ./jq -r .summary | ./jq -r .outcome`; commands.run(command, script, (result) => { res.json({ @@ -255,7 +255,7 @@ router.post('/deploying', (req, res) => { case 'url': - script = `${startingDirectory}cd ${directory};export FORCE_SHOW_SPINNER=;echo $(sfdx force:org:display --json | ${jqDirectory}jq -r .result | ${jqDirectory}jq -r .instanceUrl)"/secur/frontdoor.jsp?sid="$(sfdx force:org:display --json | ${jqDirectory}jq -r .result | ${jqDirectory}jq -r .accessToken)`; + script = `${startingDirectory}cd ${directory};export FORCE_SHOW_SPINNER=;echo $(sfdx force:org:display --json | ./jq -r .result | ./jq -r .instanceUrl)"/secur/frontdoor.jsp?sid="$(sfdx force:org:display --json | ./jq -r .result | ./jq -r .accessToken)`; commands.run(command, script, (result) => { res.json({