2018-12-12 15:21:48 +00:00
|
|
|
const gulp = require('gulp')
|
2018-12-20 23:49:17 +00:00
|
|
|
const mocha = require('gulp-mocha')
|
2018-12-12 15:21:48 +00:00
|
|
|
const print = require('gulp-print').default
|
2018-12-22 10:25:43 +00:00
|
|
|
const run = require('gulp-run-command').default
|
2018-12-12 15:21:48 +00:00
|
|
|
const nodemon = require('gulp-nodemon')
|
|
|
|
|
2021-08-16 17:07:15 +00:00
|
|
|
exports.devel = () =>
|
2018-12-12 15:21:48 +00:00
|
|
|
nodemon({
|
|
|
|
script: 'src/server.js',
|
|
|
|
presets: ['env', 'stage-2'],
|
|
|
|
})
|
|
|
|
.on('restart', () => { console.log('>> node restart') })
|
|
|
|
|
2021-08-16 17:07:15 +00:00
|
|
|
exports.test = () =>
|
2018-12-20 23:49:17 +00:00
|
|
|
gulp.src('test/**/*.js', {read: false})
|
2019-01-15 19:09:26 +00:00
|
|
|
.pipe(mocha({sort: true, reporter: 'list'}))
|
2018-12-22 09:52:31 +00:00
|
|
|
|
2021-08-16 17:07:15 +00:00
|
|
|
exports.test_watch = () =>
|
2018-12-22 09:52:31 +00:00
|
|
|
gulp.src('test/**/*.js', {read: false})
|
2019-01-15 19:09:26 +00:00
|
|
|
.pipe(mocha({sort: true, reporter: 'list', watch: true}))
|
2018-12-20 23:49:17 +00:00
|
|
|
|
2021-08-16 17:07:15 +00:00
|
|
|
exports.image_build = run('docker build -t statusteam/ghcmgr .')
|
|
|
|
exports.image_push = run('docker push statusteam/ghcmgr')
|
|
|
|
exports.image = exports.image_build
|
|
|
|
exports.push = exports.image
|
|
|
|
exports.default = exports.test
|
|
|
|
exports.docker = gulp.series(exports.test, exports.image_build, exports.image_push)
|
|
|
|
exports.release = exports.docker
|