Please sign in to comment.
Added sh/garlic.sh shell commands for imporving garlic workflow.
gcd [target] cds into the specified target working repo gcdp [target] cds into the specified target plugin in the working repo gup cds back up to the garlic'd repo from within a working path gpush [branch] from within a working repo, pushes changes back to the local garlic target, and resets local changes in that target to HEAD. This means you might have a workflow as follows (example is for a plugin): # run garlic, see probs in '2-2-stable' gcdp 2-2 # => takes you into the working repo in the '2-2-stable' target # fix the changes, make some commits gpush # => pushes the changes back to the enclosing garlic'd repo gup # => go back up there garlic # => rerun garlic to see how the changes affect the other targets
- Loading branch information...
Showing with 77 additions and 4 deletions.
|@@ -0,0 +1,34 @@|
|+# garlic shell helpers|
|+# cd into the work path of a garlic target|
|+ cd `garlic path $1`|
|+# cd into probable plugin dir of a garlic target|
|+ here=`pwd | sed 's/.*\///'`|
|+ cd `garlic path $1`/vendor/plugins/$here|
|+# cd back up to enclosing garlic project|
|+ cd `pwd | sed 's/\.garlic.*//'`|
|+# push changes back to local garlic origin, resetting the origin|
|+ if [ `pwd | sed 's/\.garlic//'` == `pwd` ]; then|
|+ echo "gpush can only be used in a garlic work repo";|
|+ git push origin $1 2>&1 | grep -v warning;|
|+ git reset --hard;|
|+ cd $here;|