Skip to content

Commit

Permalink
update dist for #10
Browse files Browse the repository at this point in the history
  • Loading branch information
irgaly committed Apr 6, 2024
1 parent 6f9cd90 commit bb203b0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64136,6 +64136,17 @@ async function execute(command, args = [], cwd) {
function pathContains(parent, child) {
return !path.relative(parent, child).startsWith("../");
}
// Caching may throw errors for legitimate reasons that should not fail the action.
// Example: Race condition between multiple github runners where both try to save cache with the same key at the same time.
// You only need 1 of the runners to save the cache. The other runners can gracefully ignore the error and continue running.
async function saveCache(paths, key) {
try {
await cache.saveCache(paths, key);
}
catch (error) {
core.warning(`Failed to cache ${key}. Error thrown: ${error}`);
}
}
async function main() {
try {
const mintDirectory = core.getInput('mint-directory');
Expand Down Expand Up @@ -64182,7 +64193,7 @@ async function main() {
await execute('swift', ['build', '-c', 'release'], `${temp}/Mint`);
fs.copyFileSync(`${temp}/Mint/.build/release/mint`, '/usr/local/bin/mint');
}
await cache.saveCache(mintPaths, mintCacheKey);
await saveCache(mintPaths, mintCacheKey);
}
if (hasMintfile && bootstrap) {
const mintDirectory = (process.env['MINT_PATH'] || '~/.mint').replace(/^~\//, `${os.homedir()}/`);
Expand Down Expand Up @@ -64247,9 +64258,9 @@ async function main() {
}
}
}
await cache.saveCache(mintDependencyPaths, mintDependencyCacheKey);
await saveCache(mintDependencyPaths, mintDependencyCacheKey);
if (mintBinaryNeedsCache) {
await cache.saveCache(mintBinaryPaths, mintBinaryCacheKey);
await saveCache(mintBinaryPaths, mintBinaryCacheKey);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit bb203b0

Please sign in to comment.