Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dist for #10 #11

Merged
merged 1 commit into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.