Skip to content

Commit

Permalink
Added conditional build verification.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhop committed May 26, 2020
1 parent 8808427 commit 3bf26e5
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions scripts/install-from-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,18 @@ const run = async cmd =>

const isVerified = async () => {
try {
await run('npm run verify-build');
return true;
if (process.env.npm_package_scripts_verify_build) {
await run('npm run verify-build');
} else if (process.env.npm_package_scripts_test) {
await run('npm test');
} else {
console.log('No verify-build nor test scripts were found -- no way to verify the build automatically.');
return false;
}
} catch (e) {
// squelch
return false;
}
return false;
return true;
};

const get = async url =>
Expand Down

0 comments on commit 3bf26e5

Please sign in to comment.