mirror of
https://github.com/Swatinem/rust-cache.git
synced 2026-10-26 17:47:41 +08:00
package maintenance
- update to TS6 - replace ncc by rollup, which seems to now be the recommended workflow according to <https://github.com/actions/typescript-action> - remove buildjet provider, as they are shutting down, see <https://buildjet.com/for-github-actions/blog/we-are-shutting-down>
This commit is contained in:
+15
-1
@@ -7,7 +7,6 @@ import os from "os";
|
||||
import path from "path";
|
||||
import * as toml from "smol-toml";
|
||||
|
||||
import { getCargoBins } from "./cleanup";
|
||||
import { CacheProvider, exists, getCmdOutput } from "./utils";
|
||||
import { Workspace } from "./workspace";
|
||||
|
||||
@@ -379,6 +378,21 @@ function digest(hasher: crypto.Hash): string {
|
||||
return hasher.digest("hex").substring(0, HASH_LENGTH);
|
||||
}
|
||||
|
||||
export async function getCargoBins(): Promise<Set<string>> {
|
||||
const bins = new Set<string>();
|
||||
try {
|
||||
const { installs }: { installs: { [key: string]: { bins: Array<string> } } } = JSON.parse(
|
||||
await fs.readFile(path.join(CARGO_HOME, ".crates2.json"), "utf8"),
|
||||
);
|
||||
for (const pkg of Object.values(installs)) {
|
||||
for (const bin of pkg.bins) {
|
||||
bins.add(bin);
|
||||
}
|
||||
}
|
||||
} catch {}
|
||||
return bins;
|
||||
}
|
||||
|
||||
interface RustVersion {
|
||||
host: string;
|
||||
release: string;
|
||||
|
||||
Reference in New Issue
Block a user