From 50437ed42c09b43892b81d59d97dd69c5f2781c5 Mon Sep 17 00:00:00 2001 From: BetaHuhn Date: Mon, 6 Sep 2021 17:40:19 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=20Rebuild=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 62bb744d..b21718aa 100644 --- a/dist/index.js +++ b/dist/index.js @@ -17260,6 +17260,7 @@ const fs = __nccwpck_require__(5630) const readfiles = __nccwpck_require__(5884) const { exec } = __nccwpck_require__(3129) const core = __nccwpck_require__(2186) +const path = __nccwpck_require__(5622) // From https://github.com/toniov/p-iteration/blob/master/lib/static-methods.js - MIT © Antonio V const forEach = async (array, callback) => { @@ -17343,7 +17344,11 @@ const copy = async (src, dest, deleteOrphaned, exclude) => { for (const file of destFileList) { if (srcFileList.indexOf(file) === -1) { core.debug(`Found a orphaned file in the target repo - ${ dest }${ file }`) - await fs.remove(`${ dest }${ file }`) + if (exclude.includes(path.join(src, file))) { + core.debug(`Excluding file ${ file }`) + } else { + await fs.remove(`${ dest }${ file }`) + } } } }