Skip to content

Filter out licenses with pattern from Pods-acknowledgements.plist

License

Notifications You must be signed in to change notification settings

y310/cocoapods-ack_filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Yusuke Mito
Feb 21, 2015
b0cebf8 · Feb 21, 2015

History

16 Commits
Feb 21, 2015
Jul 25, 2014
Jul 25, 2014
Jul 25, 2014
Feb 21, 2015
Jul 25, 2014
Sep 30, 2014

Repository files navigation

Cocoapods::AckFilter

Cocoapods aggregates installed pod's license to Pods/Pods-acknowledgements.plist. But it also includes private pod's license. AckFilter filters out such license by arbitrary pattern and re-generate aggretated plist.

Installation

Add this line to your application's Gemfile:

gem 'cocoapods-ack_filter'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cocoapods-ack_filter

Usage

pod ack-filter PATTERN [--input=FILENAME] [--output=FILENAME]
  • PATTERN is regexp pattern string
  • --input is input acknowledgements.plist filename
  • --output is output filename

Example

pod ack-filter MyCompany
# => Licenses which includes "MyCompany" are filtered out and output to "Acknowledgements.plist"
pod ack-filter MyCompany --output=Filtered.plist
# => Licenses which includes "MyCompany" are filtered out and output to "Filtered.plist"

Also, you can use ack_filter within Podfile.

post_install do
  Pod::Command::AckFilter.filter(pattern: /MyCompany/, output: 'Filtered.plist')
end

For complex condition, you can use block to define filter.

post_install do
  Pod::Command::AckFilter.filter(output: 'Filtered.plist') do |text|
    text =~ /MyCompany/ && text !~ /Foobar/
  end
end

Contributing

  1. Fork it ( https://github.com/[my-github-username]/cocoapods-ack_filter/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Filter out licenses with pattern from Pods-acknowledgements.plist

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages