mirror of
https://github.com/Swatinem/rust-cache
synced 2026-09-07 20:03:24 +00: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:
+1
-16
@@ -3,7 +3,7 @@ import * as io from "@actions/io";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
import { CARGO_HOME } from "./config";
|
||||
import { CARGO_HOME, getCargoBins } from "./config";
|
||||
import { exists } from "./utils";
|
||||
import { Packages } from "./workspace";
|
||||
|
||||
@@ -75,21 +75,6 @@ async function cleanProfileTarget(profileDir: string, packages: Packages, checkT
|
||||
await rmExcept(path.join(profileDir, "deps"), keepDeps, checkTimestamp);
|
||||
}
|
||||
|
||||
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.promises.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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean the cargo bin directory, removing the binaries that existed
|
||||
* when the action started, as they were not created by the build.
|
||||
|
||||
Reference in New Issue
Block a user