diff options
author | Tom Duffield <tom@chef.io> | 2016-12-07 17:13:08 -0600 |
---|---|---|
committer | Tom Duffield <tom@chef.io> | 2016-12-07 18:17:50 -0600 |
commit | 6447b6eab87b40ce15545d66b4401caad3a0e94d (patch) | |
tree | 9adb3c6574c40d7401a0b2ad95451c9d082b9cb1 /Rakefile | |
parent | a39d0341fbbe100c1b55167dea1170f3185b5249 (diff) | |
download | chef-6447b6eab87b40ce15545d66b4401caad3a0e94d.tar.gz |
Make sure Dockerfile is kept up to date
The build system passes in the necessary build arguments, buts its
beneficial to have the Dockerfile keep up to date with what the latest
stable version is in case people want to build their own.
Signed-off-by: Tom Duffield <tom@chef.io>
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 9 |
1 files changed, 9 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" |