Skip to content

Commit

Permalink
chore<docs>: ignore docs site build step if there's no commit on its dir
Browse files Browse the repository at this point in the history
  • Loading branch information
kimlimjustin committed Dec 28, 2021
1 parent f9860fd commit 0e6711c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/docs_build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const spawn = require('cross-spawn');

if (spawn.sync('git', ['diff', 'HEAD^', 'HEAD', '--quiet', './docs']).status > 0) {
var child = spawn('yarn', ['build'], { cwd: './docs' });
child.stdout.setEncoding('utf8');
child.stdout.on('data', (data) => {
console.log(data);
});
}
9 changes: 9 additions & 0 deletions scripts/updater_api_build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const spawn = require('cross-spawn');

if (spawn.sync('git', ['diff', 'HEAD^', 'HEAD', '--quiet', './api/updater']).status > 0) {
var child = spawn('yarn', ['build'], { cwd: './api/updater' });
child.stdout.setEncoding('utf8');
child.stdout.on('data', (data) => {
console.log(data);
});
}

0 comments on commit 0e6711c

Please sign in to comment.