From 6d9271be943d6fa14856325de2eadff68ca16b08 Mon Sep 17 00:00:00 2001 From: Rob Bavey Date: Fri, 10 Jan 2020 11:36:09 -0500 Subject: [PATCH 1/2] Only publish integration plugins that are marked as default In order to avoid overwriting individual plugins for releases that are capable of running integration plugins, only write doc entries for integration plugins that are marked as default. --- lib/logstash-docket/plugin.rb | 4 ++++ plugindocs.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/logstash-docket/plugin.rb b/lib/logstash-docket/plugin.rb index 61460b0..05ab01a 100644 --- a/lib/logstash-docket/plugin.rb +++ b/lib/logstash-docket/plugin.rb @@ -46,6 +46,10 @@ def version fail NotImplementedError end + def only_publish_default? + type == 'integration' + end + ## # @return [Time,nil] def release_date diff --git a/plugindocs.rb b/plugindocs.rb index 819b287..9cc0f21 100644 --- a/plugindocs.rb +++ b/plugindocs.rb @@ -71,7 +71,7 @@ def execute # write the doc File.write(output_asciidoc, content) puts "#{plugin.canonical_name}@#{plugin.tag}: #{release_date}\n" - end + end unless released_plugin.only_publish_default? && !is_default_plugin end end From af3aef64c5be0d1362ba4c0a8a51ecdf272cf8eb Mon Sep 17 00:00:00 2001 From: Rob Bavey Date: Fri, 10 Jan 2020 14:36:33 -0500 Subject: [PATCH 2/2] Updates based on code review comments --- lib/logstash-docket/plugin.rb | 4 ---- plugindocs.rb | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/logstash-docket/plugin.rb b/lib/logstash-docket/plugin.rb index 05ab01a..61460b0 100644 --- a/lib/logstash-docket/plugin.rb +++ b/lib/logstash-docket/plugin.rb @@ -46,10 +46,6 @@ def version fail NotImplementedError end - def only_publish_default? - type == 'integration' - end - ## # @return [Time,nil] def release_date diff --git a/plugindocs.rb b/plugindocs.rb index 9cc0f21..7074fb7 100644 --- a/plugindocs.rb +++ b/plugindocs.rb @@ -44,6 +44,11 @@ def execute "unreleased" changelog_url = released_plugin.changelog_url + if released_plugin.type == 'integration' && !is_default_plugin + $stderr.puts("[repository:#{repository_name}]: Skipping non-default Integration Plugin\n") + next + end + released_plugin.with_embedded_plugins.each do |plugin| $stderr.puts("#{plugin.desc}: fetching documentation\n") content = plugin.documentation @@ -71,7 +76,7 @@ def execute # write the doc File.write(output_asciidoc, content) puts "#{plugin.canonical_name}@#{plugin.tag}: #{release_date}\n" - end unless released_plugin.only_publish_default? && !is_default_plugin + end end end