Last active
May 2, 2017 07:29
-
-
Save narenaryan/37f164a1105f417ace5047cd2995fdb9 to your computer and use it in GitHub Desktop.
gulpfile.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gulp = require("gulp"); | |
| var shell = require('gulp-shell'); | |
| // This compiles new binary with source change | |
| gulp.task("install-binary", shell.task([ | |
| 'go install github.com/narenaryan/myserver' | |
| ])); | |
| // Second argument tells install-binary is a deapendency for restart-supervisor | |
| gulp.task("restart-supervisor", ["install-binary"], shell.task([ | |
| 'supervisorctl restart myserver' | |
| ])) | |
| gulp.task('watch', function() { | |
| // Watch the source code for all changes | |
| gulp.watch("*", ['install-binary', 'restart-supervisor']); | |
| }); | |
| gulp.task('default', ['watch']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment