Skip to content

Commit

Permalink
fix(build): break build when step fails
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Jan 26, 2022
1 parent b8ca9c0 commit cb436d3
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"audit:ci:yarn-outdated": "babel-node ./scripts/prepub/audit/toOpt && audit-ci --config ./audit-ci.json --package-manager=yarn --report-type full && babel-node ./scripts/prepub/audit/toDev",
"build": "yarn build:prebuild && yarn build:esm && yarn build:copy",
"prebuild:ci": "yarn build",
"postbuild:ci": "./scripts/release/postbuild.sh && yarn test:build",
"postbuild:ci": "./scripts/release/postbuild.sh",
"build:cjs": "./scripts/release/babel-cjs.sh",
"build:clean": "rm -rf build/**",
"build:copy": "./scripts/release/copy-build-artifacts.sh",
Expand Down
2 changes: 2 additions & 0 deletions packages/dnb-eufemia/scripts/release/babel-cjs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e # Exit immediately if a command exits with a non-zero status.

echo 'Building cjs bundle ...'

cross-env \
Expand Down
2 changes: 2 additions & 0 deletions packages/dnb-eufemia/scripts/release/babel-es.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e # Exit immediately if a command exits with a non-zero status.

echo 'Building es bundle ...'

cross-env \
Expand Down
2 changes: 2 additions & 0 deletions packages/dnb-eufemia/scripts/release/babel-esm.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e # Exit immediately if a command exits with a non-zero status.

echo 'Building esm bundle ...'

cross-env \
Expand Down
2 changes: 2 additions & 0 deletions packages/dnb-eufemia/scripts/release/copy-build-artifacts.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e # Exit immediately if a command exits with a non-zero status.

echo 'Copy artifacts ...'

rm -rf build/**/{__tests__,cjs}
Expand Down
6 changes: 6 additions & 0 deletions packages/dnb-eufemia/scripts/release/postbuild.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e # Exit immediately if a command exits with a non-zero status.

echo 'Postbuild started ...'

yarn build:types
Expand All @@ -11,4 +13,8 @@ echo 'Can be enabled in future if needed -> yarn build:resources'
yarn build:copy
yarn prettier:other

echo 'Testing the postbuild ...'

yarn test:build

echo 'Postbuild done!'

0 comments on commit cb436d3

Please sign in to comment.