From be4f6bc07ea92936264fe34eb4d08e54f411a742 Mon Sep 17 00:00:00 2001 From: Julian Herrero Date: Fri, 22 Nov 2019 12:13:16 +0700 Subject: [PATCH 1/3] Make it easier to release a new version of CONSUL With this change we no longer need the branch `changelog` and it will be easier to release new versions of CONSUL. --- Gemfile | 1 + Gemfile.lock | 17 +++++++++++++++++ Rakefile | 13 +++++++++++++ 3 files changed, 31 insertions(+) diff --git a/Gemfile b/Gemfile index 1d801c72b..c667286e2 100644 --- a/Gemfile +++ b/Gemfile @@ -93,6 +93,7 @@ group :development do gem "capistrano3-delayed-job", "~> 1.7.3" gem "capistrano3-puma", "~> 4.0.0" gem "erb_lint", require: false + gem "github_changelog_generator", "~> 1.15.0" gem "mdl", "~> 0.5.0", require: false gem "rubocop", "~> 0.75.0", require: false gem "rubocop-performance", "~> 1.4.1", require: false diff --git a/Gemfile.lock b/Gemfile.lock index dc3fea218..2694e4609 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -220,6 +220,8 @@ GEM i18n (>= 0.7) faraday (0.12.2) multipart-post (>= 1.2, < 3) + faraday-http-cache (2.0.0) + faraday (~> 0.8) ffi (1.11.1) foundation-rails (6.4.3.0) railties (>= 3.1.0) @@ -232,6 +234,14 @@ GEM railties (>= 4.1, < 6.0) tzinfo (~> 1.2, >= 1.2.2) geocoder (1.4.5) + github_changelog_generator (1.15.0) + activesupport + faraday-http-cache + multi_json + octokit (~> 4.6) + rainbow (>= 2.2.1) + rake (>= 10.0) + retriable (~> 3.0) globalid (0.4.2) activesupport (>= 4.2.0) globalize (5.2.0) @@ -348,6 +358,8 @@ GEM multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) + octokit (4.14.0) + sawyer (~> 0.8.0, >= 0.5.3) omniauth (1.8.1) hashie (>= 3.4.6, < 3.6.0) rack (>= 1.6.2, < 3) @@ -435,6 +447,7 @@ GEM responders (2.4.1) actionpack (>= 4.2.0, < 6.0) railties (>= 4.2.0, < 6.0) + retriable (3.1.2) rinku (2.0.4) rollbar (2.18.0) multi_json @@ -493,6 +506,9 @@ GEM nokogiri (>= 1.8.1) nori (~> 2.4) wasabi (~> 3.4) + sawyer (0.8.2) + addressable (>= 2.3.5) + faraday (> 0.8, < 2.0) scss_lint (0.55.0) rake (>= 0.9, < 13) sass (~> 3.4.20) @@ -612,6 +628,7 @@ DEPENDENCIES faker (~> 1.8.7) foundation-rails (~> 6.4.3.0) foundation_rails_helper (~> 3.0.0) + github_changelog_generator (~> 1.15.0) globalize (~> 5.2.0) globalize-accessors (~> 0.2.1) graphiql-rails (~> 1.4.1) diff --git a/Rakefile b/Rakefile index b99dafeef..bcd7065ef 100644 --- a/Rakefile +++ b/Rakefile @@ -5,3 +5,16 @@ require File.expand_path("../config/application", __FILE__) Rails.application.load_tasks if Rake::Task.tasks.empty? KnapsackPro.load_tasks if defined?(KnapsackPro) + +if Rails.env.development? + require "github_changelog_generator/task" + + GitHubChangelogGenerator::RakeTask.new :changelog do |config| + config.user = "consul" + config.project = "consul" + config.since_tag = "1.0.0" + config.future_release = "1.1.0" + config.base = "#{Rails.root}/CHANGELOG.md" + config.token = Rails.application.secrets.github_changelog_token + end +end From 7ec24d76f9e313a6f8f80db354ebc3942707401c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 23 Nov 2019 14:10:14 +0100 Subject: [PATCH 2/3] Don't check issues while generating the CHANGELOG We only include pull requests, so checking issues isn't useful and takes time. --- Rakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Rakefile b/Rakefile index bcd7065ef..cf4070d5c 100644 --- a/Rakefile +++ b/Rakefile @@ -16,5 +16,6 @@ if Rails.env.development? config.future_release = "1.1.0" config.base = "#{Rails.root}/CHANGELOG.md" config.token = Rails.application.secrets.github_changelog_token + config.issues = false end end From 96be43ae86b8484661c67674897aa91a7554c897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 23 Nov 2019 14:15:48 +0100 Subject: [PATCH 3/3] Don't generate authors in the CHANGELOG We were removing the authors manually after they were generated. --- Rakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Rakefile b/Rakefile index cf4070d5c..0605cbeea 100644 --- a/Rakefile +++ b/Rakefile @@ -17,5 +17,6 @@ if Rails.env.development? config.base = "#{Rails.root}/CHANGELOG.md" config.token = Rails.application.secrets.github_changelog_token config.issues = false + config.author = false end end