diff options
-rw-r--r-- | Rakefile | 9 | ||||
-rwxr-xr-x | ci/version_bump.sh | 1 |
2 files changed, 10 insertions, 0 deletions
@@ -68,6 +68,15 @@ task :register_eventlog do end end +desc "Keep the Dockerfile up-to-date" +task :update_dockerfile do + require "mixlib/install" + latest_stable_version = Mixlib::Install.available_versions("chef", "stable").last + text = File.read("Dockerfile") + new_text = text.gsub(/^ARG VERSION=[\d\.]+$/, "ARG VERSION=#{latest_stable_version}") + File.open("Dockerfile", "w+") { |f| f.write(new_text) } +end + begin require "chefstyle" require "rubocop/rake_task" diff --git a/ci/version_bump.sh b/ci/version_bump.sh index f3c345b7f0..5fa6fa4e98 100755 --- a/ci/version_bump.sh +++ b/ci/version_bump.sh @@ -8,5 +8,6 @@ export LANG=en_US.UTF-8 bundle exec rake version:bump bundle exec rake changelog +bundle exec rake update_dockerfile git checkout .bundle/config |