diff --git a/dist/restore/index.js b/dist/restore/index.js index d92653b..a9dcaa7 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -87258,7 +87258,7 @@ async function cleanGit(packages) { } catch { } } -const ONE_WEEK = 7 * 24 * 3600 * 1000; +const THREE_DAYS = 3 * 24 * 3600 * 1000; /** * Removes all files or directories in `dirName` matching some criteria. * @@ -87275,7 +87275,7 @@ async function rmExcept(dirName, keepPrefix, checkTimestamp = false) { if (checkTimestamp) { const fileName = external_path_default().join(dir.path, dirent.name); const { mtime } = await external_fs_default().promises.stat(fileName); - const isOutdated = Date.now() - mtime.getTime() > ONE_WEEK; + const isOutdated = Date.now() - mtime.getTime() > THREE_DAYS; if (isOutdated) { await rm(dir.path, dirent); } diff --git a/dist/save/index.js b/dist/save/index.js index 1c01262..bd5f12a 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -87258,7 +87258,7 @@ async function cleanGit(packages) { } catch { } } -const ONE_WEEK = 7 * 24 * 3600 * 1000; +const THREE_DAYS = 3 * 24 * 3600 * 1000; /** * Removes all files or directories in `dirName` matching some criteria. * @@ -87275,7 +87275,7 @@ async function rmExcept(dirName, keepPrefix, checkTimestamp = false) { if (checkTimestamp) { const fileName = external_path_default().join(dir.path, dirent.name); const { mtime } = await external_fs_default().promises.stat(fileName); - const isOutdated = Date.now() - mtime.getTime() > ONE_WEEK; + const isOutdated = Date.now() - mtime.getTime() > THREE_DAYS; if (isOutdated) { await rm(dir.path, dirent); } @@ -87351,7 +87351,7 @@ async function run() { allPackages.push(...packages); try { core.info(`... Cleaning ${workspace.target} ...`); - await cleanTargetDir(workspace.target, packages); + await cleanTargetDir(workspace.target, packages, true); } catch (e) { core.debug(`${e.stack}`); diff --git a/src/cleanup.ts b/src/cleanup.ts index d84a9d5..21e2602 100644 --- a/src/cleanup.ts +++ b/src/cleanup.ts @@ -253,7 +253,7 @@ export async function cleanGit(packages: Packages) { } catch {} } -const ONE_WEEK = 7 * 24 * 3600 * 1000; +const THREE_DAYS = 3 * 24 * 3600 * 1000; /** * Removes all files or directories in `dirName` matching some criteria. @@ -271,7 +271,7 @@ async function rmExcept(dirName: string, keepPrefix: Set, checkTimestamp if (checkTimestamp) { const fileName = path.join(dir.path, dirent.name); const { mtime } = await fs.promises.stat(fileName); - const isOutdated = Date.now() - mtime.getTime() > ONE_WEEK; + const isOutdated = Date.now() - mtime.getTime() > THREE_DAYS; if (isOutdated) { await rm(dir.path, dirent); diff --git a/src/save.ts b/src/save.ts index 0cff683..0505fda 100644 --- a/src/save.ts +++ b/src/save.ts @@ -47,7 +47,7 @@ async function run() { allPackages.push(...packages); try { core.info(`... Cleaning ${workspace.target} ...`); - await cleanTargetDir(workspace.target, packages); + await cleanTargetDir(workspace.target, packages, true); } catch (e) { core.debug(`${(e as any).stack}`); }