summaryrefslogtreecommitdiff
path: root/.expeditor
diff options
context:
space:
mode:
authorJeremiah Snapp <jeremiah@chef.io>2022-09-09 16:12:32 -0400
committerGitHub <noreply@github.com>2022-09-09 16:12:32 -0400
commit37a97f02edee045e5f8387f7071f67600ea811dd (patch)
tree4271bd3c07a4db1cc4863d873a0133ade29bb2ac /.expeditor
parent683fa4219f950bea41076838733a9db0f99c738a (diff)
downloadchef-37a97f02edee045e5f8387f7071f67600ea811dd.tar.gz
Use sed to bump version of chef gems in Gemfile.lock (#13005)
We only want to bump the version of the chef related gems in Gemfile.lock but the `bundle update --conservative` would frequently bump the version of other gems that are direct dependencies. Signed-off-by: Jeremiah Snapp <jeremiah@chef.io> Signed-off-by: Jeremiah Snapp <jeremiah@chef.io>
Diffstat (limited to '.expeditor')
-rwxr-xr-x.expeditor/update_version.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/.expeditor/update_version.sh b/.expeditor/update_version.sh
index d8cc70e418..c8e71e5983 100755
--- a/.expeditor/update_version.sh
+++ b/.expeditor/update_version.sh
@@ -12,6 +12,7 @@
set -evx
VERSION=$(cat VERSION)
+ORIGINAL_VERSION=$(git show main:VERSION)
sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"${VERSION}\"/" chef-config/lib/chef-config/version.rb
sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"${VERSION}\"/" chef-bin/lib/chef-bin/version.rb
@@ -21,7 +22,10 @@ sed -i -r "s/VersionString\.new\(\".+\"\)/VersionString.new(\"${VERSION}\")/" li
asdf global ruby "3.1.0"
# Update the version inside Gemfile.lock
-bundle update chef chef-config chef-utils --jobs=7 --conservative
+sed -i -r "s/(^\s+chef\s+.+)${ORIGINAL_VERSION}(.+)/\1${VERSION}\2/" Gemfile.lock
+sed -i -r "s/(^\s+chef-bin\s+.+)${ORIGINAL_VERSION}(.+)/\1${VERSION}\2/" Gemfile.lock
+sed -i -r "s/(^\s+chef-config\s+.+)${ORIGINAL_VERSION}(.+)/\1${VERSION}\2/" Gemfile.lock
+sed -i -r "s/(^\s+chef-utils\s+.+)${ORIGINAL_VERSION}(.+)/\1${VERSION}\2/" Gemfile.lock
# Once Expeditor finishes executing this script, it will commit the changes and push
# the commit as a new tag corresponding to the value in the VERSION file.