Skip to content

Commit

Permalink
#296 added user.email and user.name values in process envs and its lo…
Browse files Browse the repository at this point in the history
…gic to set the user.email and user.name in global gitconfig
  • Loading branch information
Daniel Ventura committed Nov 18, 2022
1 parent 41daf5a commit 42d072b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions copado-function/app/Init.fn.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ CONFIG.mcdevVersion = process.env.mcdev_version; // this will only be needed if
CONFIG.metadataFilePath = null; // do not change - LWC depends on it! // not needed in this case, previous value: 'mcmetadata.json'
CONFIG.source_mid = null;
CONFIG.tmpDirectory = '../tmp';
CONFIG.userEmail = process.env.git_email;
CONFIG.userName = process.env.git_name;

// retrieve
CONFIG.source_sfid = null;
// commit
Expand Down Expand Up @@ -108,15 +111,17 @@ async function run() {

try {
Log.info('');
Log.info('Adding git email');
Log.info('Adding git email and name');
Log.info('===================');
Util.execCommand(null, [`git config --global user.email "${CONFIG.gitEmail}"`]);
Log.info('');
Util.execCommand(null, [
`git config --global user.email "${CONFIG.userEmail}"`,
`git config --global user.name "${CONFIG.userName}"`,
]);
} catch (ex) {
Log.error('adding git email failed: ' + ex.message);
Log.error('adding git email and name failed: ' + ex.message);
throw ex;
}

try {
Log.info('');
Log.info('Preparing');
Expand Down

0 comments on commit 42d072b

Please sign in to comment.