Last active
January 25, 2017 18:45
-
-
Save itmustbejj/e401380d806081e7ef9bf175c023aa21 to your computer and use it in GitHub Desktop.
This file contains 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
function bump_cookbook { | |
#export BUMP_TYPE=${1:-p} | |
declare -A bump_types | |
#bump_types=(["patch"]="p" ["minor"]="mi" ["major"]="ma") | |
bump_types["patch"]="p" | |
export SV=`grep -o '\([0-9]*\.[0-9]*\.[0-9]*\)' metadata.rb`; | |
sed -i -e "s/$SV/`eval increment_version -$1 $SV`/g" metadata.rb } | |
unset SV | |
alias bcma="bump_cookbook mmajor;git add metadata.rb" | |
alias bcmi="bump_cookbook minor;git add metadata.rb" | |
alias bcp="bump_cookbook patch;git add metadata.rb" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment