Skip to content

Only publish integration plugins that are marked as default #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/logstash-docket/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ def version
fail NotImplementedError
end

def only_publish_default?
type == 'integration'
end

##
# @return [Time,nil]
def release_date
Expand Down
2 changes: 1 addition & 1 deletion plugindocs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to do this skipping early instead of hiding it in a tailing unless clause.

diff --git a/plugindocs.rb b/plugindocs.rb
index 819b287..7074fb7 100644
--- a/plugindocs.rb
+++ b/plugindocs.rb
@@ -44,6 +44,11 @@ class PluginDocs < Clamp::Command
                          "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

end
end

Expand Down