Skip to content

Commit

Permalink
Deploy Production Code for Commit 7cde9b7 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Apr 23, 2022
1 parent 7cde9b7 commit 55974d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/git.js
Expand Up @@ -85,6 +85,8 @@ function deploy(action) {
const branchExists = action.isTest & constants_1.TestFlag.HAS_REMOTE_BRANCH ||
Boolean((yield (0, execute_1.execute)(`git ls-remote --heads ${action.repositoryPath} refs/heads/${action.branch}`, action.workspace, action.silent)).stdout);
yield (0, worktree_1.generateWorktree)(action, temporaryDeploymentDirectory, branchExists);
/* Relaxes permissions of folder due to be deployed so rsync can write to/from it. */
yield (0, execute_1.execute)(`chmod -R +rw ${action.folderPath}`, action.workspace, action.silent);
// Ensures that items that need to be excluded from the clean job get parsed.
let excludes = '';
if (action.clean && action.cleanExclude) {
Expand Down Expand Up @@ -189,7 +191,7 @@ function deploy(action) {
// Cleans up temporary files/folders and restores the git state.
(0, core_1.info)('Running post deployment cleanup jobs… 🗑️');
yield (0, execute_1.execute)(`git checkout -B ${temporaryDeploymentBranch}`, `${action.workspace}/${temporaryDeploymentDirectory}`, action.silent);
yield (0, execute_1.execute)(`chmod -R 777 ${temporaryDeploymentDirectory}`, action.workspace, action.silent);
yield (0, execute_1.execute)(`chmod -R +rw ${temporaryDeploymentDirectory}`, action.workspace, action.silent);
yield (0, execute_1.execute)(`git worktree remove ${temporaryDeploymentDirectory} --force`, action.workspace, action.silent);
yield (0, io_1.rmRF)(temporaryDeploymentDirectory);
}
Expand Down

0 comments on commit 55974d4

Please sign in to comment.