-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
31 lines (26 loc) · 1.06 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const gulp = require('gulp')
const mocha = require('gulp-mocha')
const print = require('gulp-print').default
const run = require('gulp-run-command').default
const nodemon = require('gulp-nodemon')
const { version } = require('./package.json')
const IMAGE_TAG = `v${version}`
exports.devel = () =>
nodemon({
script: 'src/server.js',
presets: ['env', 'stage-2'],
})
.on('restart', () => { console.log('>> node restart') })
exports.test = () =>
gulp.src('test/**/*.js', {read: false})
.pipe(mocha({sort: true, reporter: 'list'}))
exports.test_watch = () =>
gulp.src('test/**/*.js', {read: false})
.pipe(mocha({sort: true, reporter: 'list', watch: true}))
exports.image_build = run(`docker build -t harbor.status.im/status-im/ghcmgr:${IMAGE_TAG} .`)
exports.image_push = run(`docker push harbor.status.im/status-im/ghcmgr:${IMAGE_TAG}`)
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