Skip to content

Commit

Permalink
fix(build): ensure build fails when types building fails (algolia#4812)
Browse files Browse the repository at this point in the history
* fix(build): ensure build fails when types building fails

* Apply suggestions from code review

Co-authored-by: Haroen Viaene <[email protected]>

* Update scripts/release/build-experimental-typescript.js

Co-authored-by: Haroen Viaene <[email protected]>
  • Loading branch information
tkrugg and Haroenv authored Jul 16, 2021
1 parent 3644799 commit b37e23b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/release/build-experimental-typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,11 @@ fs.writeFileSync(
`export default '${newVersion}';\n`
);

shell.exec(`NODE_ENV=production VERSION=${newVersion} yarn build`);
shell.exec('yarn build:types');
const results = [
shell.exec(`NODE_ENV=production VERSION=${newVersion} yarn build`),
shell.exec('yarn build:types'),
];

if (results.some(({ code }) => code !== 0)) {
shell.exit(1);
}

0 comments on commit b37e23b

Please sign in to comment.