Skip to content

Commit

Permalink
3.6.2 RC2
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Sep 27, 2020
1 parent e383eb8 commit e80c869
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ function init(action) {
yield execute_1.execute(`git config user.email "${action.email}"`, action.workspace, action.silent);
try {
yield execute_1.execute(`git remote rm origin`, action.workspace, action.silent);
}
finally {
if (action.isTest) {
core_1.info('Attempted to remove origin…');
throw new Error();
}
}
catch (_a) {
core_1.info('Attempted to remove origin but failed, continuing…');
}
yield execute_1.execute(`git remote add origin ${action.repositoryPath}`, action.workspace, action.silent);
if (action.preserve) {
core_1.info(`Stashing workspace changes… ⬆️`);
Expand Down Expand Up @@ -117,12 +118,13 @@ function deploy(action) {
core_1.info(`Applying stashed workspace changes… ⬆️`);
try {
yield execute_1.execute(`git stash apply`, action.workspace, action.silent);
}
finally {
if (action.isTest) {
core_1.info('Attempted to apply stash…');
throw new Error();
}
}
catch (_a) {
core_1.info('Unable to apply from stash, continuing…');
}
}
yield execute_1.execute(`git worktree add --checkout ${temporaryDeploymentDirectory} origin/${action.branch}`, action.workspace, action.silent);
// Ensures that items that need to be excluded from the clean job get parsed.
Expand All @@ -136,7 +138,7 @@ function deploy(action) {
excludes += `--exclude ${item} `;
}
}
catch (_a) {
catch (_b) {
core_1.info('There was an error parsing your CLEAN_EXCLUDE items. Please refer to the README for more details. ❌');
}
}
Expand Down

0 comments on commit e80c869

Please sign in to comment.