From ac9c4058dbdaafdef7e2e55532c89c9ae7279efd Mon Sep 17 00:00:00 2001 From: Sam Lanning Date: Thu, 17 Nov 2022 23:00:13 +0000 Subject: [PATCH] fix: recursively delete files in TARGET_DIR --- README.md | 2 +- action/dist/index.js | 3 +-- action/src/index.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7217d49..b57fa3c 100644 --- a/README.md +++ b/README.md @@ -257,7 +257,7 @@ everything, and you will need to specify exactly what needs to be deleted.** 1. Default behaviour with a custom target directory: ``` - target_dir/* + target_dir/**/* !.git ``` diff --git a/action/dist/index.js b/action/dist/index.js index 10289fa..7d9ce6f 100644 --- a/action/dist/index.js +++ b/action/dist/index.js @@ -395,7 +395,6 @@ function copyFile(srcFile, destFile, force) { } //# sourceMappingURL=io.js.map - /***/ }), /***/ 2: @@ -12283,7 +12282,7 @@ const main = async ({ env = process.env, log, }) => { } else if (env.TARGET_DIR) { log.log(`##[info] Removing all files from target dir ${env.TARGET_DIR} on target branch`); - return [`${env.TARGET_DIR}/*`, '!.git']; + return [`${env.TARGET_DIR}/**/*`, '!.git']; } else { // Remove all files diff --git a/action/src/index.ts b/action/src/index.ts index db4f007..7cc6c27 100644 --- a/action/src/index.ts +++ b/action/src/index.ts @@ -555,7 +555,7 @@ export const main = async ({ log.log( `##[info] Removing all files from target dir ${env.TARGET_DIR} on target branch` ); - return [`${env.TARGET_DIR}/*`, '!.git']; + return [`${env.TARGET_DIR}/**/*`, '!.git']; } else { // Remove all files log.log(`##[info] Removing all files from target branch`);