Created
January 29, 2016 19:08
-
-
Save justinribeiro/1af5a6a502ac8508cd9f to your computer and use it in GitHub Desktop.
Because sometimes you just want to deploy to GAE and pester co-workers in Slack.
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 git = require('git-rev-sync'); | |
var slackconfig = require('./slackbot.json'); | |
var slack = require('gulp-slack')({ | |
url: slackconfig.webhook_url, | |
channel: slackconfig.channel, | |
user: slackconfig.user, | |
icon_emoji: slackconfig.icon_emoji | |
}); | |
var packageJson = require('./package.json'); | |
gulp.task('deploy:gae', ['default'], function() { | |
var showhash = git.short(); | |
exec('appcfg.py update app.yaml', function(err, stdout, stderr) { | |
if (err) { | |
console.log('Process exited with error code', err.code); | |
return; | |
} | |
console.log(stdout); | |
console.log(stderr); | |
slack('[SHIP AHOY!] I deployed _' + showhash + '_ to App Engine for *' + packageJson.name + '*.'); | |
}); | |
}); |
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
{ | |
"webhook_url": "YOUR_SLACK_WEBHOOK", | |
"user": "S.S. Reluctant", | |
"icon_emoji": ":ship:", | |
"channel": "#my-deploy-channel" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment