Skip to content

Commit 886ad1f

Browse files
chore(ci): fail build on error (#1460)
* chore: Update pfe-sass references * chore: Update task to fail on CI if error in build * chore: Update error messaging to exit process * chore: Revert package update Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 0cf5736 commit 886ad1f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

scripts/gulpfile.factory.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module.exports = function factory({
55
} = {}) {
66
elementName = elementName.replace(/s$/, "");
77
const { task, src, dest, watch, parallel, series } = require("gulp");
8+
89
// const sassdoc = require("sassdoc");
910

1011
const paths = {
@@ -77,7 +78,11 @@ module.exports = function factory({
7778
outputStyle: "expanded",
7879
// Pointing to the global node modules path
7980
includePaths: ["../../node_modules"]
80-
}).on("error", sass.logError)
81+
})
82+
.on("error", gulpif(!process.env.CI, sass.logError, (err) => {
83+
sass.logError;
84+
process.exit(1);
85+
}))
8186
)
8287
// Adds autoprefixing to the compiled sass
8388
.pipe(

scripts/tools.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports.printOpts = (key, value) =>
1717
: `="${value}"`
1818
}`;
1919

20-
module.exports.lernaRun = (command, components) => `lerna -- run ${command} --no-bail --parallel --include-dependencies ${
20+
module.exports.lernaRun = (command, components) => `lerna -- run ${command} --no-bail --stream --include-dependencies ${
2121
components.length > 0 ? components.map(item => `--scope "*/${item}"`).join(" ") : ""}`;
2222

2323

0 commit comments

Comments
 (0)