mirror of
https://github.com/Swatinem/rust-cache.git
synced 2024-11-26 17:56:08 +08:00
Additionally key on Rust toolchain file(s) if present
This commit is contained in:
parent
a9bca6b5a6
commit
da42bbe56d
@ -64,7 +64,8 @@ This cache is automatically keyed by:
|
||||
|
||||
- the github `job`,
|
||||
- the rustc release / host / hash, and
|
||||
- a hash of the `Cargo.lock` / `Cargo.toml` files.
|
||||
- a hash of the `Cargo.lock` / `Cargo.toml` files (if present).
|
||||
- a hash of the `rust-toolchain` / `rust-toolchain.toml` files (if present).
|
||||
|
||||
An additional input `key` can be provided if the builtin keys are not sufficient.
|
||||
|
||||
|
@ -136,7 +136,7 @@ export async function getCmdOutput(
|
||||
}
|
||||
|
||||
async function getLockfileHash(): Promise<string> {
|
||||
const globber = await glob.create("**/Cargo.toml\n**/Cargo.lock", { followSymbolicLinks: false });
|
||||
const globber = await glob.create("**/Cargo.toml\n**/Cargo.lock\nrust-toolchain\nrust-toolchain.toml", { followSymbolicLinks: false });
|
||||
const files = await globber.glob();
|
||||
files.sort((a, b) => a.localeCompare(b));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user