3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2025-11-08 00:15:06 +00:00

lol, dependency check was reversed

This commit is contained in:
Arpad Borsos 2022-07-09 17:37:48 +02:00
parent 7c190ef171
commit 07a2ee71bc
No known key found for this signature in database
GPG key ID: FC7BCA77824B3298
5 changed files with 32 additions and 53 deletions

View file

@ -32,23 +32,22 @@ async function run() {
// TODO: remove this once https://github.com/actions/toolkit/pull/553 lands
await macOsWorkaround();
core.info(`... Cleaning Cache ...`);
const registryName = await getRegistryName(config);
const allPackages = [];
for (const workspace of config.workspaces) {
const packages = await workspace.getPackages();
allPackages.push(...packages);
try {
core.info(`... Cleaning ${workspace.target} ...`);
await cleanTargetDir(workspace.target, packages);
} catch (e) {
core.info(`[warning] ${(e as any).stack}`);
}
}
const registryName = await getRegistryName(config);
if (registryName) {
try {
core.info(`... Cleaning cargo registry ...`);
await cleanRegistry(config, registryName, allPackages);
} catch (e) {
core.info(`[warning] ${(e as any).stack}`);
@ -56,12 +55,14 @@ async function run() {
}
try {
core.info(`... Cleaning cargo/bin ...`);
await cleanBin(config);
} catch (e) {
core.info(`[warning] ${(e as any).stack}`);
}
try {
core.info(`... Cleaning cargo git cache ...`);
await cleanGit(config, allPackages);
} catch (e) {
core.info(`[warning] ${(e as any).stack}`);