Skip to content

Commit 11d9eac

Browse files
committed
Rebuild dist
1 parent 58a3e0f commit 11d9eac

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

dist/cache-save/index.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -73693,9 +73693,11 @@ function wellKnownCachePath() {
7369373693
}
7369473694
}
7369573695

73696-
async function getCacheKey() {
73696+
async function getCacheKey(scarbLockfilePath) {
7369773697
const platform = process.env.RUNNER_OS;
73698-
const fileHash = await glob.hashFiles(await getScarbLockfilePath());
73698+
const fileHash = await glob.hashFiles(
73699+
await getScarbLockfilePath(scarbLockfilePath),
73700+
);
7369973701

7370073702
if (!fileHash) {
7370173703
throw new Error(
@@ -73706,8 +73708,8 @@ async function getCacheKey() {
7370673708
return `scarb-cache-${platform}-${fileHash}`.toLowerCase();
7370773709
}
7370873710

73709-
async function getScarbLockfilePath() {
73710-
const lockfilePath = path.join(process.env.GITHUB_WORKSPACE, "Scarb.lock");
73711+
async function getScarbLockfilePath(scarbLockfilePath) {
73712+
const lockfilePath = scarbLockfilePath || "Scarb.lock";
7371173713

7371273714
await fs.access(lockfilePath).catch((_) => {
7371373715
throw new Error("failed to find Scarb.lock");

dist/cache-save/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup/index.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -74790,9 +74790,11 @@ function wellKnownCachePath() {
7479074790
}
7479174791
}
7479274792

74793-
async function getCacheKey() {
74793+
async function getCacheKey(scarbLockfilePath) {
7479474794
const platform = process.env.RUNNER_OS;
74795-
const fileHash = await glob.hashFiles(await getScarbLockfilePath());
74795+
const fileHash = await glob.hashFiles(
74796+
await getScarbLockfilePath(scarbLockfilePath),
74797+
);
7479674798

7479774799
if (!fileHash) {
7479874800
throw new Error(
@@ -74803,8 +74805,8 @@ async function getCacheKey() {
7480374805
return `scarb-cache-${platform}-${fileHash}`.toLowerCase();
7480474806
}
7480574807

74806-
async function getScarbLockfilePath() {
74807-
const lockfilePath = external_path_default().join(process.env.GITHUB_WORKSPACE, "Scarb.lock");
74808+
async function getScarbLockfilePath(scarbLockfilePath) {
74809+
const lockfilePath = scarbLockfilePath || "Scarb.lock";
7480874810

7480974811
await promises_default().access(lockfilePath).catch((_) => {
7481074812
throw new Error("failed to find Scarb.lock");
@@ -74821,13 +74823,13 @@ async function getScarbLockfilePath() {
7482174823

7482274824

7482374825

74824-
async function restoreCache() {
74826+
async function restoreCache(scarbLockPath) {
7482574827
const cacheDir = await getCacheDirectory();
7482674828
await promises_default().mkdir(cacheDir, { recursive: true });
7482774829

7482874830
core.info(`Restoring Scarb cache into ${cacheDir}`);
7482974831

74830-
const primaryKey = await getCacheKey();
74832+
const primaryKey = await getCacheKey(scarbLockPath);
7483174833
core.info(`Cache primary key is ${primaryKey}`);
7483274834
core.saveState(State.CachePrimaryKey, primaryKey);
7483374835

@@ -74853,6 +74855,7 @@ async function main() {
7485374855
try {
7485474856
const scarbVersionInput = core.getInput("scarb-version");
7485574857
const toolVersionsPathInput = core.getInput("tool-versions");
74858+
const scarbLockPathInput = core.getInput("scarb-lock");
7485674859

7485774860
const { repo: scarbRepo, version: scarbVersion } = await determineVersion(
7485874861
scarbVersionInput,
@@ -74886,7 +74889,7 @@ async function main() {
7488674889

7488774890
core.setOutput("scarb-version", await getFullVersionFromScarb());
7488874891

74889-
await restoreCache().catch((e) => {
74892+
await restoreCache(scarbLockPathInput).catch((e) => {
7489074893
core.error(
7489174894
`There was an error when restoring cache: ${
7489274895
e instanceof Error ? e.message : e

dist/setup/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)