diff --git a/.expeditor/update_version.sh b/.expeditor/update_version.sh old mode 100644 new mode 100755 index 501d24b23..6ccc10463 --- a/.expeditor/update_version.sh +++ b/.expeditor/update_version.sh @@ -11,7 +11,9 @@ sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" lib/chef-dk # 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-dk\s\(.+\)$/chef-dk \($(cat VERSION)\)/" Gemfile.lock +# We only replace the first instance because chef-apply now also has ChefDK as a +# dependency, and we don't want to replace that constraint. +sed -i -r "0,/chef-dk\s\(.+\)$/s/chef-dk\s\(.+\)$/chef-dk \($(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. diff --git a/Gemfile.lock b/Gemfile.lock index 8b74e1dd8..37a96df82 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -140,7 +140,7 @@ GEM mime-types chef-apply (0.1.18) chef (>= 14.0) - chef-dk (3.1.7) + chef-dk (>= 3.0) chef-telemetry mixlib-cli mixlib-config