Skip to content

Commit

Permalink
removed CONFIG.localDev check that prevents git operations
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Oct 16, 2022
1 parent 9a09ea0 commit e523dcf
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 36 deletions.
14 changes: 0 additions & 14 deletions copado-function/app/Commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,6 @@ class Util {
* @returns {void}
*/
static push(destinationBranch) {
if (CONFIG.localDev) {
Log.debug('🔥 Skipping git action in local dev environment');
return;
}
Util.execCommand(
'Push branch ' + destinationBranch,
['git push origin "' + destinationBranch + '"'],
Expand Down Expand Up @@ -722,11 +718,6 @@ class Commit {
* @returns {void}
*/
static addSelectedComponents(gitAddArr) {
if (CONFIG.localDev) {
Log.debug('🔥 Skipping git action in local dev environment');
return;
}

// Iterate all metadata components selected by user to commit

for (const filePath of gitAddArr) {
Expand Down Expand Up @@ -760,11 +751,6 @@ class Commit {
Log.debug('Git diff ended with the result:');
Log.debug(gitDiffArr);
if (Array.isArray(gitDiffArr) && gitDiffArr.length) {
if (CONFIG.localDev) {
Log.debug('🔥 Skipping git action in local dev environment');
return;
}

Util.execCommand(
'Commit',
['git commit -m "' + CONFIG.commitMessage + '"'],
Expand Down
18 changes: 0 additions & 18 deletions copado-function/app/Deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,6 @@ class Util {
* @returns {void}
*/
static push(destinationBranch) {
if (CONFIG.localDev) {
Log.debug('🔥 Skipping git action in local dev environment');
return;
}
Util.execCommand(
'Push branch ' + destinationBranch,
['git push origin "' + destinationBranch + '"'],
Expand Down Expand Up @@ -745,11 +741,6 @@ class Commit {
* @returns {void}
*/
static addSelectedComponents(gitAddArr) {
if (CONFIG.localDev) {
Log.debug('🔥 Skipping git action in local dev environment');
return;
}

// Iterate all metadata components selected by user to commit

for (const filePath of gitAddArr) {
Expand Down Expand Up @@ -782,11 +773,6 @@ class Commit {
Log.debug('Git diff ended with the result:');
Log.debug(gitDiffArr);
if (Array.isArray(gitDiffArr) && gitDiffArr.length) {
if (CONFIG.localDev) {
Log.debug('🔥 Skipping git action in local dev environment');
return;
}

Util.execCommand(
'Commit',
['git commit -m "' + CONFIG.commitMessage + '"'],
Expand Down Expand Up @@ -1047,10 +1033,6 @@ class Deploy {
* @returns {void}
*/
static merge(promotionBranch) {
if (CONFIG.localDev) {
Log.debug('🔥 Skipping git action in local dev environment');
return;
}
// Merge and commit changes.
Util.execCommand(
'Merge commit ' + promotionBranch,
Expand Down
4 changes: 0 additions & 4 deletions copado-function/app/Retrieve.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,6 @@ class Util {
* @returns {void}
*/
static push(destinationBranch) {
if (CONFIG.localDev) {
Log.debug('🔥 Skipping git action in local dev environment');
return;
}
Util.execCommand(
'Push branch ' + destinationBranch,
['git push origin "' + destinationBranch + '"'],
Expand Down

0 comments on commit e523dcf

Please sign in to comment.