-
-
Save Harshit369/a696c35c10fe679f435eb147e0947c4d to your computer and use it in GitHub Desktop.
Revisions
-
lemiorhan revised this gist
Feb 11, 2014 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,11 +7,16 @@ while read oldrev newrev refname do branch=$(git rev-parse --symbolic --abbrev-ref $refname) if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then GIT_WORK_TREE=$working_tree git checkout $target_branch -f NOW=$(date +"%Y%m%d-%H%M") git tag release_$NOW $target_branch echo " /===============================" echo " | DEPLOYMENT COMPLETED" echo " | Target branch: $target_branch" echo " | Target folder: $working_tree" echo " | Tag name : release_$NOW" echo " \==============================" fi done -
lemiorhan created this gist
Feb 10, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #!/bin/bash target_branch="production" working_tree="PATH_TO_DEPLOY" while read oldrev newrev refname do branch=$(git rev-parse --symbolic --abbrev-ref $refname) if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then GIT_WORK_TREE=$working_tree git checkout $target_branch -f echo " /===============================" echo " | DEPLOYMENT COMPLETED" echo " | Target branch: $target_branch" echo " | Target folder: $working_tree" echo " \==============================" fi done