Skip to content

Instantly share code, notes, and snippets.

@digitalcraft
Created February 17, 2016 03:24
Show Gist options
  • Select an option

  • Save digitalcraft/8d35c88802b735d5383c to your computer and use it in GitHub Desktop.

Select an option

Save digitalcraft/8d35c88802b735d5383c to your computer and use it in GitHub Desktop.

Revisions

  1. digitalcraft created this gist Feb 17, 2016.
    21 changes: 21 additions & 0 deletions ci.coffee
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    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