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
| #!/bin/bash | |
| ### El script debe estar en la ruta .git/hooks/post-receive del servidor Git | |
| while read oldrev newrev ref | |
| do | |
| if [[ $ref =~ .*/master$ ]]; then | |
| echo "Push a $ref recibido. Procesando despliegue de rama $ref en Producción...." | |
| git --work-tree=/srv/http/html --git-dir=/home/goidor/git/proyecto.git checkout -f master | |
| elif [[ $ref =~ .*/develop$ ]]; then | |
| echo "Push a $ref recibido. Procesando despliegue de rama $ref en Desarrollo...." | |
| git --work-tree=/srv/http/html-develop --git-dir=/home/goidor/git/proyecto.git checkout -f develop |
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
| #!/bin/bash | |
| while read oldrev newrev ref | |
| do | |
| branch=`echo $ref | cut -d/ -f3` | |
| if [ "master" == "$branch" ]; then | |
| git --work-tree=./path/under/root/dir/live-site/ checkout -f $branch | |
| echo 'Changes pushed live.' | |
| fi |
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
| Here is a list of scopes to use in Sublime Text 2 snippets - | |
| ActionScript: source.actionscript.2 | |
| AppleScript: source.applescript | |
| ASP: source.asp | |
| Batch FIle: source.dosbatch | |
| C#: source.cs | |
| C++: source.c++ | |
| Clojure: source.clojure | |
| CoffeeScript: source.coffee |