init
Este commit está contenido en:
commit
bf6c5e6196
1
.gitignore
vendido
Archivo normal
1
.gitignore
vendido
Archivo normal
|
@ -0,0 +1 @@
|
|||
*.swp
|
26
deployment.coffee
Archivo normal
26
deployment.coffee
Archivo normal
|
@ -0,0 +1,26 @@
|
|||
# Description:
|
||||
# Deployment script
|
||||
#
|
||||
# Commands:
|
||||
# hubot deploy <project> [from branch <branch>] to <environnement> [after <command>[, <command>, ...]]
|
||||
#
|
||||
# URLS:
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
|
||||
module.exports = (robot) ->
|
||||
robot.hear /deploy ([^\s]+)( from branch ([^\s]+))? to ([^\s]+)( after (.*))?$/i, (res) ->
|
||||
project = res.match[1]
|
||||
environnement = res.match[4]
|
||||
branch = if res.match[3] then res.match[3] else null
|
||||
commands = if res.match[6] then cleanCommands res.match[6].split(',') else []
|
||||
|
||||
cleanCommands = (commands) ->
|
||||
results = []
|
||||
commands = commands.map(Function.prototype.call, String.prototype.trim)
|
||||
|
||||
for command in commands
|
||||
results.push(command) if command != ''
|
||||
|
||||
results
|
Cargando…
Referencia en una nueva incidencia