mirror of
https://github.com/actions/setup-java.git
synced 2025-05-21 09:51:47 +00:00
Merge ed3ab602f8
into 2e74cbce18
This commit is contained in:
commit
ac97333c2e
4443
dist/cleanup/index.js
vendored
4443
dist/cleanup/index.js
vendored
File diff suppressed because it is too large
Load Diff
BIN
dist/index.js
generated
vendored
Normal file
BIN
dist/index.js
generated
vendored
Normal file
Binary file not shown.
4443
dist/setup/index.js
vendored
4443
dist/setup/index.js
vendored
File diff suppressed because it is too large
Load Diff
@ -58,7 +58,8 @@ const supportedPackageManager: PackageManager[] = [
|
|||||||
'**/*.sbt',
|
'**/*.sbt',
|
||||||
'**/project/build.properties',
|
'**/project/build.properties',
|
||||||
'**/project/**.scala',
|
'**/project/**.scala',
|
||||||
'**/project/**.sbt'
|
'**/project/**.sbt',
|
||||||
|
'!**/version.sbt' // releasing a new version of a library project shouldn't invalidate the entire sbt cache
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -92,13 +93,15 @@ async function computeCacheKey(
|
|||||||
const pattern = cacheDependencyPath
|
const pattern = cacheDependencyPath
|
||||||
? cacheDependencyPath.trim().split('\n')
|
? cacheDependencyPath.trim().split('\n')
|
||||||
: packageManager.pattern;
|
: packageManager.pattern;
|
||||||
const fileHash = await glob.hashFiles(pattern.join('\n'));
|
const fileHash = await glob.hashFiles(pattern.join('\n'), undefined, undefined, true);
|
||||||
if (!fileHash) {
|
if (!fileHash) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`No file in ${process.cwd()} matched to [${pattern}], make sure you have checked out the target repository`
|
`No file in ${process.cwd()} matched to [${pattern}], make sure you have checked out the target repository`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${fileHash}`;
|
const cacheKey = `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${fileHash}`;
|
||||||
|
core.info(`cacheKey is ${cacheKey}`);
|
||||||
|
return cacheKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user