summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-10-20 14:54:34 -0700
committerTim Smith <tsmith84@gmail.com>2020-10-20 14:55:01 -0700
commitbbb1c7c9d857ca367f7ddf9b6d803b2cbc8b2e0a (patch)
tree96d150b157e50973bf56f4acfc0ffa228e7ea505 /tasks
parente005d9b85d4bad73ad4a71e007fd8ece0734b9b3 (diff)
downloadchef-bbb1c7c9d857ca367f7ddf9b6d803b2cbc8b2e0a.tar.gz
Remove the announcement rake task + minor task updates
- The rake task to generate the announcement no longer works because our release notes file contains all the release notes. We're going to need some automation in the future for this, but this isn't it. - Convert the docs task from .to_yml to YAML.dump - Improve the component rake task description - Nuke another copyright data range Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'tasks')
-rw-r--r--tasks/announce.rb51
-rwxr-xr-xtasks/docs.rb2
-rw-r--r--tasks/rspec.rb2
-rw-r--r--tasks/templates/release.md.erb34
4 files changed, 2 insertions, 87 deletions
diff --git a/tasks/announce.rb b/tasks/announce.rb
deleted file mode 100644
index f3e6fa6212..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(/^# Chef Infra Client Release Notes #{@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
diff --git a/tasks/docs.rb b/tasks/docs.rb
index 16f16e7cfe..4bce62695e 100755
--- a/tasks/docs.rb
+++ b/tasks/docs.rb
@@ -315,7 +315,7 @@ namespace :docs_site do
FileUtils.mkdir_p "docs_site/#{resource}"
# write out the yaml contents of the hash and append a --- since this is actually a yaml
# block in the middle of a markdown page and the block needs an ending
- File.open("docs_site/#{resource}/_index.md", "w") { |f| f.write(resource_data.to_yaml + "---") }
+ File.open("docs_site/#{resource}/_index.md", "w") { |f| f.write(YAML.dump(resource_data) + "---") }
end
end
end
diff --git a/tasks/rspec.rb b/tasks/rspec.rb
index 2bf673a5a6..929e0f91b0 100644
--- a/tasks/rspec.rb
+++ b/tasks/rspec.rb
@@ -23,7 +23,7 @@ require "rake"
begin
require "rspec/core/rake_task"
- desc "Run specs for Chef's Components"
+ desc "Run specs for Chef's Gem Components"
task :component_specs do
%w{chef-utils chef-config}.each do |gem|
Dir.chdir(gem) do
diff --git a/tasks/templates/release.md.erb b/tasks/templates/release.md.erb
deleted file mode 100644
index 366ae2b0a6..0000000000
--- a/tasks/templates/release.md.erb
+++ /dev/null
@@ -1,34 +0,0 @@
-Ohai Chefs!
-
-We're happy to announce the release of Chef v<%= @maj_minor %>!
-
-# Release Highlights
-
-<%= @release_notes %>
-
-Please see the [CHANGELOG](https://github.com/chef/chef/blob/master/CHANGELOG.md) for the complete list of changes.
-
-# Get the Build
-As always, you can download binaries directly from [downloads.chef.io](https://downloads.chef.io/chef/<%= @version %>) or by using the `mixlib-install` command line utility:
-
-```shell
-$ mixlib-install download chef -v <%= @version %>
-```
-
-Alternatively, you can install Chef using one of the following command options:
-
-```shell
-# In Shell
-$ curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P chef -v <%= @version %>
-
-# In Windows Powershell
-. { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -project chef -version <%= @version %>
-```
-
-If you want to give this version a spin in Test Kitchen, create or add the following to your `kitchen.yml` file:
-
-```yaml
-provisioner:
- product_name: chef
- product_version: <%= @version %>
-```