summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Duffield <tom@chef.io>2016-12-02 08:25:00 -0600
committerTom Duffield <tom@chef.io>2016-12-02 08:55:38 -0600
commitdbdd18650028e10822aaf10f3f4704244b7d1d8e (patch)
tree8b8f33589b34591dd12d74429e05b71994dab897
parent88269ebd629775c625b121709991ebc76d9c0fa4 (diff)
downloadchef-dbdd18650028e10822aaf10f3f4704244b7d1d8e.tar.gz
Use tduffield branch of github-changelog-generator
This branch fixes a number of bugs in the changelog generator, and supports the type of behavior that we want when generating our changelog. There is a PR open against upstream (skywinder/github-changelog-generator#453) to merge this upstream. As part of this, we can now generate the changelog on every commit. Signed-off-by: Tom Duffield <tom@chef.io>
-rw-r--r--Gemfile3
-rw-r--r--Gemfile.lock108
-rwxr-xr-xci/version_bump.sh1
-rw-r--r--tasks/changelog.rb21
4 files changed, 73 insertions, 60 deletions
diff --git a/Gemfile b/Gemfile
index 782a85357d..c03ce1c5d4 100644
--- a/Gemfile
+++ b/Gemfile
@@ -78,7 +78,8 @@ group(:development, :test) do
end
group(:changelog) do
- gem "github_changelog_generator"
+ gem "github_changelog_generator", git: "https://github.com/tduffield/github-changelog-generator", branch: "adjust-tag-section-mapping"
+ gem "mixlib-install"
end
group(:travis) do
diff --git a/Gemfile.lock b/Gemfile.lock
index 44bb684a99..1440235c90 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/chef/chef-server
- revision: be1f43367a3a75e7a1b771a11fb5e48b6f6cf310
+ revision: 18c5684338f72379fe0c280f6fce8dee4fc355d2
specs:
oc-chef-pedant (2.2.0)
activesupport (>= 4.2.7.1, < 6.0)
@@ -16,11 +16,11 @@ GIT
GIT
remote: https://github.com/chef/chefstyle.git
- revision: 71b73a0f481d595bf222e1804c7152d2415f69a4
+ revision: 739602df221c9d03d94608ce3040d48f0e0c67e3
branch: master
specs:
chefstyle (0.4.0)
- rubocop (= 0.44.1)
+ rubocop (= 0.45.0)
GIT
remote: https://github.com/rubysec/bundler-audit.git
@@ -30,6 +30,20 @@ GIT
bundler (~> 1.2)
thor (~> 0.18)
+GIT
+ remote: https://github.com/tduffield/github-changelog-generator
+ revision: 7ef584546fcd21f983a4382b2123d7a0a1e833fd
+ branch: adjust-tag-section-mapping
+ specs:
+ github_changelog_generator (1.14.2)
+ activesupport
+ faraday-http-cache
+ multi_json
+ octokit (~> 4.6)
+ rainbow (>= 2.1)
+ rake (>= 10.0)
+ retriable (~> 2.1)
+
PATH
remote: .
specs:
@@ -121,19 +135,21 @@ GEM
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.4.0)
- appbundler (0.9.0)
+ appbundler (0.10.0)
mixlib-cli (~> 1.4)
- artifactory (2.5.0)
+ artifactory (2.5.1)
ast (2.3.0)
- aws-sdk (2.6.18)
- aws-sdk-resources (= 2.6.18)
- aws-sdk-core (2.6.18)
+ aws-sdk (2.6.32)
+ aws-sdk-resources (= 2.6.32)
+ aws-sdk-core (2.6.32)
+ aws-sigv4 (~> 1.0)
jmespath (~> 1.0)
- aws-sdk-resources (2.6.18)
- aws-sdk-core (= 2.6.18)
+ aws-sdk-resources (2.6.32)
+ aws-sdk-core (= 2.6.32)
aws-sdk-v1 (1.66.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
+ aws-sigv4 (1.0.0)
backports (3.6.8)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
@@ -150,10 +166,10 @@ GEM
net-ssh (>= 2.9, < 4.0)
net-ssh-gateway (~> 1.2.0)
winrm-fs (~> 1.0)
- chef-provisioning-aws (2.0.0)
+ chef-provisioning-aws (2.1.0)
aws-sdk (>= 2.1.26, < 3.0)
aws-sdk-v1 (>= 1.59.0)
- chef-provisioning (~> 2.0)
+ chef-provisioning (>= 1.0, < 3.0)
retryable (~> 2.0, >= 2.0.1)
ubuntu_ami (~> 0.4, >= 0.4.1)
chef-sugar (3.4.0)
@@ -172,13 +188,12 @@ GEM
rspec (~> 3.0)
codeclimate-test-reporter (0.6.0)
simplecov (>= 0.7.1, < 1.0.0)
- codecov (0.1.7)
+ codecov (0.1.9)
json
simplecov
url
coderay (1.1.1)
concurrent-ruby (1.0.2)
- connection_pool (2.2.0)
cucumber (2.4.0)
builder (>= 2.1.2)
cucumber-core (~> 1.5.0)
@@ -193,18 +208,18 @@ GEM
debug_inspector (0.0.2)
diff-lcs (1.2.5)
docile (1.1.5)
- domain_name (0.5.20161021)
+ domain_name (0.5.20161129)
unf (>= 0.0.5, < 1.0.0)
erubis (2.7.0)
- ethon (0.9.1)
+ ethon (0.10.0)
ffi (>= 1.3.0)
excon (0.54.0)
- faraday (0.9.2)
+ faraday (0.10.0)
multipart-post (>= 1.2, < 3)
- faraday-http-cache (1.3.1)
+ faraday-http-cache (2.0.0)
faraday (~> 0.8)
- faraday_middleware (0.10.0)
- faraday (>= 0.7.4, < 0.10)
+ faraday_middleware (0.10.1)
+ faraday (>= 0.7.4, < 1.0)
fauxhai (3.10.0)
net-ssh
ffi (1.9.14)
@@ -225,23 +240,15 @@ GEM
rspec-core (~> 3.0)
ruby-progressbar (~> 1.4)
fuzzyurl (0.9.0)
- gh (0.14.0)
- addressable
+ gh (0.15.0)
+ addressable (~> 2.4.0)
backports
faraday (~> 0.8)
multi_json (~> 1.0)
- net-http-persistent (>= 2.7)
+ net-http-persistent (~> 2.9)
net-http-pipeline
gherkin (4.0.0)
git (1.3.0)
- github_changelog_generator (1.14.1)
- activesupport
- faraday-http-cache
- multi_json
- octokit (~> 4.0)
- rainbow (>= 2.1)
- rake (>= 10.0)
- retriable (~> 2.1)
gssapi (1.2.0)
ffi (>= 1.0.1)
gyoku (1.3.1)
@@ -273,9 +280,9 @@ GEM
kitchen-sync (2.1.1)
net-sftp
test-kitchen (>= 1.0.0)
- kitchen-vagrant (0.20.0)
+ kitchen-vagrant (0.21.0)
test-kitchen (~> 1.4)
- knife-windows (1.7.0)
+ knife-windows (1.7.1)
winrm (~> 2.1)
winrm-elevated (~> 1.0)
launchy (2.4.3)
@@ -291,14 +298,14 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
- minitest (5.9.1)
+ minitest (5.10.1)
mixlib-archive (0.2.0)
mixlib-log
mixlib-authentication (1.4.1)
mixlib-log
mixlib-cli (1.7.0)
mixlib-config (2.2.4)
- mixlib-install (2.1.6)
+ mixlib-install (2.1.7)
artifactory
mixlib-shellout
mixlib-versioning
@@ -312,8 +319,7 @@ GEM
multi_json (1.12.1)
multi_test (0.1.2)
multipart-post (2.0.0)
- net-http-persistent (3.0.0)
- connection_pool (~> 2.2)
+ net-http-persistent (2.9.4)
net-http-pipeline (1.0.1)
net-http-spy (0.2.1)
net-scp (1.2.1)
@@ -333,9 +339,9 @@ GEM
nokogiri (1.6.8.1-x86-mingw32)
mini_portile2 (~> 2.1.0)
nori (2.6.0)
- octokit (4.4.1)
- sawyer (~> 0.7.0, >= 0.5.3)
- ohai (8.21.0)
+ octokit (4.6.2)
+ sawyer (~> 0.8.0, >= 0.5.3)
+ ohai (8.22.0)
chef-config (>= 12.5.0.alpha.1, < 13)
ffi (~> 1.9)
ffi-yajl (~> 2.2)
@@ -347,7 +353,7 @@ GEM
plist (~> 3.1)
systemu (~> 2.6.4)
wmi-lite (~> 1.0)
- parser (2.3.1.4)
+ parser (2.3.3.1)
ast (~> 2.2)
plist (3.2.0)
poise (2.7.1)
@@ -389,7 +395,7 @@ GEM
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
- pry-byebug (3.4.0)
+ pry-byebug (3.4.1)
byebug (~> 9.0)
pry (~> 0.10)
pry-remote (0.1.8)
@@ -437,7 +443,7 @@ GEM
rspec_junit_formatter (0.2.3)
builder (< 4)
rspec-core (>= 2, < 4, != 2.12.0)
- rubocop (0.44.1)
+ rubocop (0.45.0)
parser (>= 2.3.1.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
@@ -450,9 +456,9 @@ GEM
rubyzip (1.2.0)
rufus-lru (1.1.0)
safe_yaml (1.0.4)
- sawyer (0.7.0)
- addressable (>= 2.3.5, < 2.5)
- faraday (~> 0.8, < 0.10)
+ sawyer (0.8.1)
+ addressable (>= 2.3.5, < 2.6)
+ faraday (~> 0.8, < 1.0)
serverspec (2.37.2)
multi_json
rspec (~> 3.0)
@@ -475,7 +481,7 @@ GEM
logify (~> 0.2)
syslog-logger (1.6.8)
systemu (2.6.5)
- test-kitchen (1.13.2)
+ test-kitchen (1.14.0)
mixlib-install (>= 1.2, < 3.0)
mixlib-shellout (>= 1.2, < 3.0)
net-scp (~> 1.1)
@@ -483,16 +489,17 @@ GEM
net-ssh-gateway (~> 1.2.0)
safe_yaml (~> 1.0)
thor (~> 0.18)
- thor (0.19.1)
+ thor (0.19.4)
thread_safe (0.3.5)
tomlrb (1.2.3)
- travis (1.8.2)
+ travis (1.8.4)
backports
faraday (~> 0.9)
faraday_middleware (~> 0.9, >= 0.9.1)
gh (~> 0.13)
highline (~> 1.6)
launchy (~> 2.1)
+ net-http-persistent (~> 2.9)
pusher-client (~> 0.4)
typhoeus (~> 0.6, >= 0.6.8)
treetop (1.6.8)
@@ -572,9 +579,10 @@ DEPENDENCIES
chefstyle!
cucumber (>= 2.4.0)
foodcritic
- github_changelog_generator
+ github_changelog_generator!
halite
knife-windows
+ mixlib-install
netrc
nokogiri
oc-chef-pedant!
diff --git a/ci/version_bump.sh b/ci/version_bump.sh
index 00d5e70fce..f3c345b7f0 100755
--- a/ci/version_bump.sh
+++ b/ci/version_bump.sh
@@ -7,5 +7,6 @@ export LANG=en_US.UTF-8
. ci/bundle_install.sh
bundle exec rake version:bump
+bundle exec rake changelog
git checkout .bundle/config
diff --git a/tasks/changelog.rb b/tasks/changelog.rb
index 989c43845d..5f2648bad1 100644
--- a/tasks/changelog.rb
+++ b/tasks/changelog.rb
@@ -1,26 +1,29 @@
begin
require "github_changelog_generator/task"
+ require "mixlib/install"
namespace :changelog do
- # Take the current changelog and move it to HISTORY.md. Removes lines that
- # would get duplicated the next time we pull HISTORY into the CHANGELOG.
+ # Fetch the latest version from mixlib-install
+ latest_stable_version = Mixlib::Install.available_versions("chef", "stable").last
+
+ # Take the changelog from the latest stable release and put it into history.
task :archive do
- changelog = File.readlines("CHANGELOG.md")
- File.open("HISTORY.md", "w+") { |f| f.write(changelog[2..-4].join("")) }
+ changelog = Net::HTTP.get(URI("https://raw.githubusercontent.com/chef/chef/v#{latest_stable_version}/CHANGELOG.md")).chomp.split("\n")
+ File.open("HISTORY.md", "w+") { |f| f.write(changelog[2..-4].join("\n")) }
end
# Run this to just update the changelog for the current release. This will
- # take what is in History and generate a changelog of PRs between the most
- # recent tag in HISTORY.md and HEAD.
+ # take what is in HISTORY and generate a changelog of PRs between the most
+ # recent stable version and HEAD.
GitHubChangelogGenerator::RakeTask.new :update do |config|
- config.future_release = Chef::VERSION
- config.between_tags = ["v#{Chef::VERSION}"]
+ config.future_release = "v#{Chef::VERSION}"
+ config.between_tags = ["v#{latest_stable_version}", "v#{Chef::VERSION}"]
config.max_issues = 0
config.add_issues_wo_labels = false
config.enhancement_labels = "enhancement,Enhancement,New Feature,Feature".split(",")
config.bug_labels = "bug,Bug,Improvement,Upstream Bug".split(",")
config.exclude_labels = "duplicate,question,invalid,wontfix,no_changelog,Exclude From Changelog,Question,Discussion".split(",")
- config.header = "This changelog reflects the current state of chef's master branch on github and may not reflect the current released version of chef, which is [![Gem Version](https://badge.fury.io/rb/chef.svg)](https://badge.fury.io/rb/chef)"
+ config.header = "This changelog reflects the current state of chef's master branch on github and may not reflect the current released version of chef, which is **#{latest_stable_version}**."
end
end