Bladeren bron

add git to regenerate api - close #76 (#117)

pull/118/head
Cian Butler 4 jaren geleden
committed by GitHub
bovenliggende
commit
b86c845688
2 gewijzigde bestanden met toevoegingen van 51 en 0 verwijderingen
  1. +42
    -0
      .yarnclean
  2. +9
    -0
      routes/regenerate.js

+ 42
- 0
.yarnclean Bestand weergeven

@@ -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
- 0
routes/regenerate.js Bestand weergeven

@@ -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(


Laden…
Annuleren
Opslaan