From 3e3d8c490f8eef69b019e789ceb2c59aed11eab8 Mon Sep 17 00:00:00 2001 From: Florian Meriaux Date: Wed, 25 May 2022 11:39:10 +0200 Subject: [PATCH] sbt-cache: don't cache some files. --- dist/cleanup/index.js | 5 ++++- dist/setup/index.js | 5 ++++- src/cache.ts | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index cfa2fb8..235d0c3 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -65448,7 +65448,10 @@ const supportedPackageManager = [ path: [ path_1.join(os_1.default.homedir(), '.ivy2', 'cache'), path_1.join(os_1.default.homedir(), '.sbt'), - getCoursierCachePath() + getCoursierCachePath(), + //TODO: comment the reason of exclusions + '!' + path_1.join(os_1.default.homedir(), '.sbt', '*.lock'), + '!' + path_1.join(os_1.default.homedir(), '**', 'ivydata-*.properties') ], pattern: ['**/*.sbt', '**/project/build.properties', '**/project/**.{scala,sbt}'] } diff --git a/dist/setup/index.js b/dist/setup/index.js index f2a2170..0703230 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -100653,7 +100653,10 @@ const supportedPackageManager = [ path: [ path_1.join(os_1.default.homedir(), '.ivy2', 'cache'), path_1.join(os_1.default.homedir(), '.sbt'), - getCoursierCachePath() + getCoursierCachePath(), + //TODO: comment the reason of exclusions + '!' + path_1.join(os_1.default.homedir(), '.sbt', '*.lock'), + '!' + path_1.join(os_1.default.homedir(), '**', 'ivydata-*.properties') ], pattern: ['**/*.sbt', '**/project/build.properties', '**/project/**.{scala,sbt}'] } diff --git a/src/cache.ts b/src/cache.ts index 0ddc426..e73d078 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -38,7 +38,10 @@ const supportedPackageManager: PackageManager[] = [ path: [ join(os.homedir(), '.ivy2', 'cache'), join(os.homedir(), '.sbt'), - getCoursierCachePath() + getCoursierCachePath(), + //TODO: comment the reason of exclusions + '!' + join(os.homedir(), '.sbt', '*.lock'), + '!' + join(os.homedir(), '**', 'ivydata-*.properties') ], pattern: ['**/*.sbt', '**/project/build.properties', '**/project/**.{scala,sbt}'] }