pull/496/head
Frostebite 2023-02-19 14:19:37 +00:00
parent 757062359b
commit 3a1bcc9dad
3 changed files with 9 additions and 3 deletions

4
dist/index.js generated vendored
View File

@ -5746,8 +5746,10 @@ class SharedWorkspaceLocking {
}
static DoesCacheKeyTopLevelExist(buildParametersContext) {
return __awaiter(this, void 0, void 0, function* () {
const rootLines = yield SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceBucketRoot}`);
const lines = yield SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}`);
return lines.map((x) => x.replace(`/`, ``)).includes(buildParametersContext.cacheKey);
return (rootLines.map((x) => x.replace(`/`, ``)).includes(`locks`) &&
lines.map((x) => x.replace(`/`, ``)).includes(buildParametersContext.cacheKey));
});
}
static NewWorkspaceName() {

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -26,9 +26,13 @@ export class SharedWorkspaceLocking {
.map((x) => x.split(`_`)[1]);
}
public static async DoesCacheKeyTopLevelExist(buildParametersContext: BuildParameters) {
const rootLines = await SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceBucketRoot}`);
const lines = await SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}`);
return lines.map((x) => x.replace(`/`, ``)).includes(buildParametersContext.cacheKey);
return (
rootLines.map((x) => x.replace(`/`, ``)).includes(`locks`) &&
lines.map((x) => x.replace(`/`, ``)).includes(buildParametersContext.cacheKey)
);
}
public static NewWorkspaceName() {