summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2021-01-21 17:22:52 -0800
committerGitHub <noreply@github.com>2021-01-21 17:22:52 -0800
commitba79bcd396b4a370e4e84cce16afbad703fd610d (patch)
tree69765d293efc86af07a41a10d56d801b249805c4
parent1db8dafdcd9ff42c35e6b6ed0b9d7a6a7e565ac1 (diff)
parent510b308ddabaae22343dc12a9f04761fdb3c858e (diff)
downloadchef-ba79bcd396b4a370e4e84cce16afbad703fd610d.tar.gz
Merge pull request #10919 from chef/lcg/fix-chef-15
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--Rakefile28
-rw-r--r--chef-bin/Rakefile4
-rw-r--r--omnibus/Gemfile.lock42
-rw-r--r--tasks/announce.rb51
4 files changed, 36 insertions, 89 deletions
diff --git a/Rakefile b/Rakefile
index f7938d2e79..14fdb8cef2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,7 +1,7 @@
#
# Author:: Adam Jacob (<adam@chef.io>)
# Author:: Daniel DeLeo (<dan@chef.io>)
-# Copyright:: Copyright 2008-2019, Chef Software Inc.
+# Copyright:: Copyright, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,16 +17,20 @@
# limitations under the License.
#
+# we need this to resolve files required by lib/chef/dist
+$LOAD_PATH.unshift(File.expand_path("chef-config/lib", __dir__))
+
begin
require_relative "tasks/rspec"
require_relative "tasks/dependencies"
- require_relative "tasks/announce"
require_relative "tasks/docs"
- require_relative "lib/chef/dist"
+ require_relative "lib/chef/dist" unless defined?(Chef::Dist)
rescue LoadError => e
puts "Skipping missing rake dep: #{e}"
end
+require "bundler/gem_helper"
+
ENV["CHEF_LICENSE"] = "accept-no-persist"
# hack the chef-config install to run before the traditional install task
@@ -38,6 +42,7 @@ task :super_install do
end
# Templating the powershell extensions so we can inject distro constants
+ require "erb"
template_file = ::File.join(::File.dirname(__FILE__), "distro", "templates", "powershell", "chef", "chef.psm1.erb")
psm1_path = ::File.join(::File.dirname(__FILE__), "distro", "powershell", "chef")
FileUtils.mkdir_p psm1_path
@@ -55,8 +60,9 @@ Bundler::GemHelper.install_tasks name: gemspec
# this gets appended to the normal bundler install helper
task :install do
chef_bin_path = ::File.join(::File.dirname(__FILE__), "chef-bin")
- Dir.chdir(chef_bin_path)
- sh("rake install:force")
+ Dir.chdir(chef_bin_path) do
+ sh("rake install:force")
+ end
end
task :pedant, :chef_zero_spec
@@ -82,15 +88,3 @@ begin
rescue LoadError
puts "chefstyle/rubocop is not available. bundle install first to make sure all dependencies are installed."
end
-
-begin
- require "yard"
- DOC_FILES = [ "spec/tiny_server.rb", "lib/**/*.rb" ].freeze
-
- YARD::Rake::YardocTask.new(:docs) do |t|
- t.files = DOC_FILES
- t.options = ["--format", "html"]
- end
-rescue LoadError
- puts "yard is not available. bundle install first to make sure all dependencies are installed."
-end
diff --git a/chef-bin/Rakefile b/chef-bin/Rakefile
index 5626d1bc5d..7fe4f1e9d4 100644
--- a/chef-bin/Rakefile
+++ b/chef-bin/Rakefile
@@ -1,6 +1,8 @@
# we need to force the install in order to overwrite the binstubs from
# old chef gems.
+require "bundler/gem_helper"
+
Bundler::GemHelper.install_tasks
# this is necessary to use to overwrite any chef-14 or earlier era gem which has the bin files in
@@ -8,7 +10,7 @@ Bundler::GemHelper.install_tasks
desc "force install the chef-bin gem"
task "install:force" do
sh "gem build -V chef-bin.gemspec"
- built_gem_path = Dir["chef-bin-*.gem"].sort_by { |f| File.mtime(f) }.last
+ built_gem_path = Dir["chef-bin-*.gem"].max_by { |f| File.mtime(f) }
FileUtils.mkdir_p("pkg") unless Dir.exist?("pkg")
FileUtils.mv(built_gem_path, "pkg")
sh "gem install -f pkg/#{built_gem_path}"
diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock
index 927f40880b..1f37207f82 100644
--- a/omnibus/Gemfile.lock
+++ b/omnibus/Gemfile.lock
@@ -18,7 +18,7 @@ GIT
GIT
remote: https://github.com/chef/omnibus-software
- revision: 1cff56e31219e2851d2651e9b92fffd15e42bd00
+ revision: 05f70739fb4a14d5c117c620ba7bb24dce6fd538
branch: master
specs:
omnibus-software (4.0.0)
@@ -64,12 +64,12 @@ GEM
solve (~> 4.0)
thor (>= 0.20)
builder (3.2.4)
- chef (16.9.16)
+ chef (16.9.29)
addressable
bcrypt_pbkdf (= 1.1.0.rc2)
bundler (>= 1.10)
- chef-config (= 16.9.16)
- chef-utils (= 16.9.16)
+ chef-config (= 16.9.29)
+ chef-utils (= 16.9.29)
chef-vault
chef-zero (>= 14.0.11)
diff-lcs (>= 1.2.4, < 1.4.0)
@@ -100,13 +100,13 @@ GEM
tty-prompt (~> 0.21)
tty-screen (~> 0.6)
tty-table (~> 0.11)
- uuidtools (~> 2.1.5)
- chef (16.9.16-universal-mingw32)
+ uuidtools (>= 2.1.5, < 3.0)
+ chef (16.9.29-universal-mingw32)
addressable
bcrypt_pbkdf (= 1.1.0.rc2)
bundler (>= 1.10)
- chef-config (= 16.9.16)
- chef-utils (= 16.9.16)
+ chef-config (= 16.9.29)
+ chef-utils (= 16.9.29)
chef-vault
chef-zero (>= 14.0.11)
diff-lcs (>= 1.2.4, < 1.4.0)
@@ -138,7 +138,7 @@ GEM
tty-prompt (~> 0.21)
tty-screen (~> 0.6)
tty-table (~> 0.11)
- uuidtools (~> 2.1.5)
+ uuidtools (>= 2.1.5, < 3.0)
win32-api (~> 1.5.3)
win32-certstore (~> 0.3)
win32-event (~> 0.6.1)
@@ -150,9 +150,9 @@ GEM
win32-taskscheduler (~> 2.0)
wmi-lite (~> 1.0)
chef-cleanroom (1.0.2)
- chef-config (16.9.16)
+ chef-config (16.9.29)
addressable
- chef-utils (= 16.9.16)
+ chef-utils (= 16.9.29)
fuzzyurl
mixlib-config (>= 2.2.12, < 4.0)
mixlib-shellout (>= 2.0, < 4.0)
@@ -161,7 +161,7 @@ GEM
chef-config
concurrent-ruby (~> 1.0)
ffi-yajl (~> 2.2)
- chef-utils (16.9.16)
+ chef-utils (16.9.29)
chef-vault (4.1.0)
chef-zero (15.0.4)
ffi-yajl (~> 2.2)
@@ -173,14 +173,16 @@ GEM
citrus (3.0.2)
cleanroom (1.0.0)
coderay (1.1.3)
- concurrent-ruby (1.1.7)
+ concurrent-ruby (1.1.8)
diff-lcs (1.3)
ed25519 (1.2.4)
erubi (1.10.0)
erubis (2.7.0)
- faraday (1.1.0)
+ faraday (1.3.0)
+ faraday-net_http (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords
+ faraday-net_http (1.0.1)
ffi (1.14.2)
ffi (1.14.2-x64-mingw32)
ffi (1.14.2-x86-mingw32)
@@ -199,10 +201,10 @@ GEM
highline (2.0.3)
httpclient (2.8.3)
iniparse (1.5.0)
- inspec-core (4.24.26)
+ inspec-core (4.25.1)
addressable (~> 2.4)
chef-telemetry (~> 1.0)
- faraday (>= 0.9.0, < 1.2)
+ faraday (>= 0.9.0, < 1.4)
hashie (>= 3.4, < 5.0)
license-acceptance (>= 0.2.13, < 3.0)
method_source (>= 0.8, < 2.0)
@@ -211,7 +213,7 @@ GEM
parallel (~> 1.9)
parslet (>= 1.5, < 3.0)
pry (~> 0.13)
- rspec (~> 3.10)
+ rspec (>= 3.9, < 3.11)
rspec-its (~> 1.2)
rubyzip (>= 1.2.2, < 3.0)
semverse (~> 3.0)
@@ -331,7 +333,7 @@ GEM
rspec-support (~> 3.10.0)
rspec-support (3.10.1)
ruby-progressbar (1.11.0)
- ruby2_keywords (0.0.2)
+ ruby2_keywords (0.0.4)
rubyntlm (0.6.2)
rubyzip (2.3.0)
sawyer (0.8.2)
@@ -362,7 +364,7 @@ GEM
winrm (~> 2.0)
winrm-elevated (~> 1.0)
winrm-fs (~> 1.1)
- thor (1.0.1)
+ thor (1.1.0)
toml-rb (2.0.1)
citrus (~> 3.0, > 3.0)
tomlrb (1.3.0)
@@ -397,7 +399,7 @@ GEM
tty-screen (~> 0.8)
unicode-display_width (1.7.0)
unicode_utils (1.4.0)
- uuidtools (2.1.5)
+ uuidtools (2.2.0)
webrick (1.7.0)
win32-api (1.5.3-universal-mingw32)
win32-certstore (0.4.1)
diff --git a/tasks/announce.rb b/tasks/announce.rb
deleted file mode 100644
index 9ac5635c0b..0000000000
--- a/tasks/announce.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Copyright:: Copyright (c) Chef Software Inc.
-# License:: Apache License, Version 2.0
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-require "date"
-require "erb"
-
-class ReleaseAnnouncement
- include ERB::Util
- attr_accessor :type, :version, :maj_minor, :date, :release_notes
-
- def initialize(version, date, type)
- @version = version
- @maj_minor = version.split(".")[0..1].join(".")
- @date = Date.parse(date) unless date.nil?
- @release_notes = release_notes_from_file
- @type = type
- end
-
- def render
- puts "-" * 30
- puts ERB.new(template_for(@type)).result(binding)
- puts "-" * 30
- end
-
- def template_for(type)
- File.read("tasks/templates/#{type}.md.erb")
- end
-
- def release_notes_from_file
- File.read("RELEASE_NOTES.md").match(/^# What's New In #{@maj_minor}:\n\n(.*)/m)[1]
- end
-end
-
-desc "Generate the Release Announcement (version: X.Y.Z)"
-task :announce_release, :version do |t, args|
- ReleaseAnnouncement.new(args[:version], nil, "release").render
-end