Created
January 25, 2017 18:44
-
-
Save itmustbejj/8adf8e396f26521677dd47630611191e 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"]="m" ["major"]="M") | |
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