diff options
author | Tim Smith <tsmith@chef.io> | 2018-08-08 09:47:19 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-08-08 09:51:23 -0700 |
commit | bb947f1d9e626f7cefcde9cf3499b981aa14f03d (patch) | |
tree | 33ad8f41acd8889162ec423689e4da69adae0765 /.expeditor/update_dep.sh | |
parent | 7c9178e5dd4ec7b5a75993c148b087bac6e5b53d (diff) | |
download | chef-bb947f1d9e626f7cefcde9cf3499b981aa14f03d.tar.gz |
Automatically open PRs on dep gem updates
This uses expeditor subscriptions to automatically cut a PR to update gems when a dependent Chef managed gem is pushed to rubygems.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to '.expeditor/update_dep.sh')
-rw-r--r-- | .expeditor/update_dep.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.expeditor/update_dep.sh b/.expeditor/update_dep.sh new file mode 100644 index 0000000000..a27df411d5 --- /dev/null +++ b/.expeditor/update_dep.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +set -evx + +branch="expeditor/${GEM_NAME}_${VERSION}" +git checkout -b "$branch" + +bundle update $GEM_NAME + +git add . +git commit --message "Bump $GEM_NAME to $VERSION" --message "This pull request was triggered automatically via Expeditor when $GEM_NAME $VERSION was promoted to Rubygems." + +open_pull_request + +# Get back to master and cleanup the leftovers - any changed files left over at the end of this script will get committed to master. +git checkout - +git branch -D "$branch" |