summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneha-p6 <neha.pansare@progress.com>2022-12-21 20:38:40 +0530
committerGitHub <noreply@github.com>2022-12-21 20:38:40 +0530
commit00a1f93e8a20ab9685797d704982e31d894c7674 (patch)
treeada5e24526471faedd6f75a1a845a5bbdf08c992
parent88974f21f9237d10fce70bdf52c9dec645bec53d (diff)
downloadchef-00a1f93e8a20ab9685797d704982e31d894c7674.tar.gz
[Chef-16] fix version bumps (#13452)
* Use sed to bump version of chef gems in Gemfile.lock 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> * User chef16 branch in version bump script Signed-off-by: Neha Pansare <neha.pansare@progress.com> Signed-off-by: Jeremiah Snapp <jeremiah@chef.io> Signed-off-by: Neha Pansare <neha.pansare@progress.com> Co-authored-by: Jeremiah Snapp <jeremiah@chef.io>
-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 2a75c4b2f9..6736e7c4aa 100755
--- a/.expeditor/update_version.sh
+++ b/.expeditor/update_version.sh
@@ -12,6 +12,7 @@
set -evx
VERSION=$(cat VERSION)
+ORIGINAL_VERSION=$(git show chef-16: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
@@ -19,7 +20,10 @@ sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"${VERSION}\"/" chef-utils/lib/
sed -i -r "s/VersionString\.new\(\".+\"\)/VersionString.new(\"${VERSION}\")/" lib/chef/version.rb
# 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.