Skip to content

Instantly share code, notes, and snippets.

@txag1995
Last active January 28, 2016 18:13
Show Gist options
  • Save txag1995/ca075bc275e02f340277 to your computer and use it in GitHub Desktop.
Save txag1995/ca075bc275e02f340277 to your computer and use it in GitHub Desktop.
knife spork bump sample-cookbook $BUMP_LEVEL
COOKBOOK_VERSION=v`sed -n "s/^ *version *[\'\"]\(.*\)[\'\"]/\1/p" cookbooks/$JOB_NAME/metadata.rb`
echo COOKBOOK_VERSION=$COOKBOOK_VERSION >> build.properties
cd cookbooks/$JOB_NAME
if [ -b "Berksfile.lock" ]
then
berks update sample-cookbook
else
berks install
fi
berks upload sample-cookbook
git add metadata.rb
git commit -m "Bump version to $COOKBOOK_VERSION"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment