summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRanjib Dey <ranjib@linux.com>2017-04-17 09:37:52 -0700
committerRanjib Dey <ranjib@linux.com>2017-04-17 09:37:52 -0700
commitdebd2f83b5697aaf6c1bfb57e51555f19c125e7a (patch)
treed43df2fb02f3ca9c81551400e3ca961956257c6b
parentd0342681c35bdfa32e0e8e82cb035ab577b74e3e (diff)
downloadchef-debd2f83b5697aaf6c1bfb57e51555f19c125e7a.tar.gz
fetch latest stable version only if its required
-rw-r--r--tasks/changelog.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/tasks/changelog.rb b/tasks/changelog.rb
index 8484acde24..1f969637c3 100644
--- a/tasks/changelog.rb
+++ b/tasks/changelog.rb
@@ -4,7 +4,9 @@ begin
namespace :changelog do
# Fetch the latest version from mixlib-install
- latest_stable_version = Mixlib::Install.available_versions("chef", "stable").last
+ def latest_stable_version
+ Mixlib::Install.available_versions("chef", "stable").last
+ end
# Take the changelog from the latest stable release and put it into history.
task :archive do