Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

Commit

Permalink
add git to regenerate api - close #76 (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
butlerx committed Feb 13, 2017
1 parent 2ed040d commit b86c845
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .yarnclean
@@ -0,0 +1,42 @@
# test directories
__tests__
test
tests
powered-test

# asset directories
docs
doc
website
images
assets

# examples
example
examples

# code coverage directories
coverage
.nyc_output

# build scripts
Makefile
Gulpfile.js
Gruntfile.js

# configs
.tern-project
.gitattributes
.editorconfig
.*ignore
.eslintrc
.jshintrc
.flowconfig
.documentup.json
.yarn-metadata.json
.*.yml
*.yml

# misc
*.gz
*.md
9 changes: 9 additions & 0 deletions routes/regenerate.js
Expand Up @@ -39,6 +39,15 @@ router.get('/regenerate', function (req, res) {
logger.error(buffer.toString());
});

logger.info('Pulling Submodules');
const gitModule = spawn('git', ['submodule', 'update', '--remote']);
gitModule.stdout.on('data', function (buffer) {
logger.info(buffer.toString());
});
gitModule.stderr.on('data', function (buffer) {
logger.error(buffer.toString());
});

logger.info('Generating hexo static files...');
let generateOk = true;
const hexoGenerate = spawn(
Expand Down

0 comments on commit b86c845

Please sign in to comment.