Skip to content

Commit

Permalink
Force checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
Sauloxd committed Sep 2, 2020
1 parent 01a7e16 commit 20553a8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10175,7 +10175,7 @@ async function onPrClose({
}) {
await retry(5)(async () => {
await exec('git', ['fetch', 'origin', ghBranch]);
await exec('git', ['checkout', ghBranch]);
await exec('git', ['checkout', '-f', ghBranch]);
await exec('git', ['reset', '--hard', 'origin/' + ghBranch]);
await io.rmRF(pathByBranch);
const manifest = removeApp({ manifest: getManifest(), branchName, slug });
Expand Down Expand Up @@ -10257,7 +10257,7 @@ async function otherEvents({
await exec('mv', [distDir, '.tmp']);

await exec('git', ['fetch', 'origin', ghBranch]);
await exec('git', ['checkout', ghBranch]);
await exec('git', ['checkout', '-f', ghBranch]);

const manifest = replaceApp({
manifest: getManifest(),
Expand All @@ -10273,7 +10273,7 @@ async function otherEvents({
const retry5 = retry(5);
await retry5(async () => {
await exec('git', ['fetch', 'origin', ghBranch]);
await exec('git', ['checkout', ghBranch]);
await exec('git', ['checkout', '-f', ghBranch]);
await exec('git', ['reset', '--hard', 'origin/' + ghBranch]);
core.debug('Coping .tmp/. -> ' + pathByHeadCommit);
await io.cp('.tmp/.', pathByHeadCommit, { recursive: true, force: true });
Expand Down
2 changes: 1 addition & 1 deletion packages/action/src/on-pr-close.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function onPrClose({
}) {
await retry(5)(async () => {
await exec('git', ['fetch', 'origin', ghBranch]);
await exec('git', ['checkout', ghBranch]);
await exec('git', ['checkout', '-f', ghBranch]);
await exec('git', ['reset', '--hard', 'origin/' + ghBranch]);
await io.rmRF(pathByBranch);
const manifest = removeApp({ manifest: getManifest(), branchName, slug });
Expand Down
4 changes: 2 additions & 2 deletions packages/action/src/other-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function otherEvents({
await exec('mv', [distDir, '.tmp']);

await exec('git', ['fetch', 'origin', ghBranch]);
await exec('git', ['checkout', ghBranch]);
await exec('git', ['checkout', '-f', ghBranch]);

const manifest = replaceApp({
manifest: getManifest(),
Expand All @@ -68,7 +68,7 @@ async function otherEvents({
const retry5 = retry(5);
await retry5(async () => {
await exec('git', ['fetch', 'origin', ghBranch]);
await exec('git', ['checkout', ghBranch]);
await exec('git', ['checkout', '-f', ghBranch]);
await exec('git', ['reset', '--hard', 'origin/' + ghBranch]);
core.debug('Coping .tmp/. -> ' + pathByHeadCommit);
await io.cp('.tmp/.', pathByHeadCommit, { recursive: true, force: true });
Expand Down

0 comments on commit 20553a8

Please sign in to comment.