Skip to content

Instantly share code, notes, and snippets.

@digitalcraft
Created February 17, 2016 03:24
Show Gist options
  • Save digitalcraft/8d35c88802b735d5383c to your computer and use it in GitHub Desktop.
Save digitalcraft/8d35c88802b735d5383c to your computer and use it in GitHub Desktop.
ci in coffee script
fs = require 'fs'
{spawn, exec} = require 'child_process'
express = require 'express'
app = express()
app.configure ->
app.use express.bodyParser()
app.post '/512A3538-3FC9-4745-BD78-71901E72912F', (req, res) ->
payload = req.body
console.log 'payload', payload, payload.constructor
exec 'git fetch && git checkout origin/staging', (error, stdout, stderr) ->
console.log 'checked out'
res.send 'ok'
server = app.listen 13377
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment