diff options
Diffstat (limited to '.expeditor/update_version.sh')
-rwxr-xr-x | .expeditor/update_version.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/.expeditor/update_version.sh b/.expeditor/update_version.sh index f8d0c8d92b..a4036cf648 100755 --- a/.expeditor/update_version.sh +++ b/.expeditor/update_version.sh @@ -7,10 +7,15 @@ set -evx sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" chef-config/lib/chef-config/version.rb -sed -i -r "s/VersionString\.new\(\".+\"\)/VersionString.new(\"$(cat VERSION)\")/" lib/chef/version.rb +sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" lib/chef/version.rb -# Update the version inside Gemfile.lock -bundle lock --update chef chef-config +# There is a bug (https://github.com/bundler/bundler/issues/5644) that is preventing +# us from updating the chef-dk gem via `bundle update` or `bundle lock --update`. +# Until that is addressed, let's replace the version using sed. +sed -i -r "s/chef\s\([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\)$/chef \($(cat VERSION)\)/" Gemfile.lock +sed -i -r "s/chef\s\([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\-(.+)\)$/chef \($(cat VERSION)-\1\)/" Gemfile.lock +sed -i -r "s/chef-config\s\([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\)$/chef-config \($(cat VERSION)\)/" Gemfile.lock +sed -i -r "s/chef-config\s\(= [[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\)$/chef-config \(= $(cat VERSION)\)/" Gemfile.lock # Once Expeditor finshes executing this script, it will commit the changes and push # the commit as a new tag corresponding to the value in the VERSION file. |