diff options
author | John Keiser <john@johnkeiser.com> | 2016-01-27 12:08:33 -0800 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2016-01-27 12:08:33 -0800 |
commit | 6e1707278d44a734dc6775fc141a611127e74180 (patch) | |
tree | 9d80fd54d5a8b9692aaf1e67a4613532043c73fa /chef-config/lib/chef-config/package_task.rb | |
parent | 6defab990c91e07361cc27a41d506338ca915527 (diff) | |
download | chef-6e1707278d44a734dc6775fc141a611127e74180.tar.gz |
Bump version to 12.7.0, and make "rake version" use just the one VERSION filejk/bump-12.7.0
Diffstat (limited to 'chef-config/lib/chef-config/package_task.rb')
-rw-r--r-- | chef-config/lib/chef-config/package_task.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/chef-config/lib/chef-config/package_task.rb b/chef-config/lib/chef-config/package_task.rb index 59620ad03a..37eed6415a 100644 --- a/chef-config/lib/chef-config/package_task.rb +++ b/chef-config/lib/chef-config/package_task.rb @@ -47,10 +47,6 @@ module ChefConfig @module_path || module_name.downcase end - # Path to a VERSION file with a single string that contains the package version. - # By default, this is root_path/VERSION - attr_accessor :version_file_path - # Directory used to store package files and output that is generated. # This has the same meaning (or lack thereof) as package_dir in # rake/packagetask. @@ -70,7 +66,6 @@ module ChefConfig @module_name = module_name @component_paths = [] @module_path = nil - @version_file_path = "VERSION" @package_dir = "pkg" @git_remote = "origin" @generate_version_class = false @@ -84,8 +79,12 @@ module ChefConfig File.expand_path("lib/#{module_path}/version.rb", root_path) end + def chef_root_path + module_name == "Chef" ? root_path : File.dirname(root_path) + end + def version - IO.read(File.expand_path(version_file_path, root_path)).strip + IO.read(File.join(chef_root_path, "VERSION")).strip end def full_package_dir @@ -175,7 +174,7 @@ module ChefConfig #{class_or_module} #{module_name} #{module_name.upcase}_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__))) - VERSION = '#{version}' + VERSION = "#{version}" end # |