From e7d2a32e606ba5c83f2ccb4fa2c7fd6999978aed Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 12 Feb 2020 21:25:01 +0000 Subject: [PATCH 1/2] Update documentation [ci skip] --- CHANGELOG.md | 10 +++++++++- README.md | 22 ++++++++++++++++++++-- example/App/MethodSwizzler.m | 2 +- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3db91a5..6f52cc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,15 @@ ## Next release * Update the markdown and plist files in `Pods/Target Support Files`. -* Support wildcard characters in the excluded filenames +* Support wildcard characters in the excluded filenames. +* Find dependencies installed via Swift Package Manager: + +```rb +plugin "cocoapods-acknowledgements-addons", + add: ["directory_to_search"], + with_spm: true, + exclude: ["lib_name*"] +``` ## 0.2.0 diff --git a/README.md b/README.md index 0a5c79e..8e52c8b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # CocoaPods Acknowledgements Add-ons +[![GitHub Actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fbcylin%2Fcocoapods-acknowledgements-addons%2Fbadge&style=flat)](https://github.com/bcylin/cocoapods-acknowledgements-addons/actions) [![Build Status](https://travis-ci.org/bcylin/cocoapods-acknowledgements-addons.svg?branch=master)](https://travis-ci.org/bcylin/cocoapods-acknowledgements-addons) -[![Gem Version](https://badge.fury.io/rb/cocoapods-acknowledgements-addons.svg)](https://badge.fury.io/rb/cocoapods-acknowledgements-addons) +[![Gem Version](https://badge.fury.io/rb/cocoapods-acknowledgements-addons.svg)](https://rubygems.org/gems/cocoapods-acknowledgements-addons) A CocoaPods plugin that adds additional acknowledgements to the plist generated by [cocoapods-acknowledgements](https://github.com/CocoaPods/cocoapods-acknowledgements). @@ -13,7 +14,14 @@ Install via `gem install cocoapods-acknowledgements` or add it to the **Gemfile* gem "cocoapods-acknowledgements-addons" ``` -## Use case +## Prerequisites + +1. CocoaPods and [cocoapods-acknowledgements](https://github.com/CocoaPods/cocoapods-acknowledgements) +2. The installed libraries provide podspec + +## Use cases + +### With Carthage / git submodules If you have some dependencies installed via CocoaPods and some installed using different ways, such as [Carthage](https://github.com/Carthage/Carthage) or git submodules, you can aggregate the acknowledgements in one place. @@ -31,6 +39,16 @@ plugin "cocoapods-acknowledgements" plugin "cocoapods-acknowledgements-addons", add: ["Carthage/Checkouts"] ``` +### With Swift Package Manager + +To find the dependencies installed via [Swift Package Manager](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app) in `~/Library/Developer/Xcode/DerivedData`, specify `with_spm: true` when using the plugin: + +```rb +plugin "cocoapods-acknowledgements-addons", add: ["Carthage/Checkouts"], with_spm: true +``` + +## What's modified? + The plugin searches `**/*.podspec` located in the specified directories and adds the acknowledgements to the plist generated by [cocoapods-acknowledgements](https://github.com/CocoaPods/cocoapods-acknowledgements), which can be found in the `Pods` directory: ``` diff --git a/example/App/MethodSwizzler.m b/example/App/MethodSwizzler.m index fd381a4..229ca64 100644 --- a/example/App/MethodSwizzler.m +++ b/example/App/MethodSwizzler.m @@ -40,7 +40,7 @@ + (void)load { } /** - Load `*-App-metadata.plist` instead of `*-metadata.plist`. + Load `*-App-metadata.plist` instead of `*-metadata.plist` to avoid `Pods-App-settings-metadata.plist` when `settings_bundle: true`. @param bundle The bundle that contains the plist. @return An array of CPDLibrary. From 82aeda25511531aa271bfef48b4042e90d766b6a Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 13 Feb 2020 21:03:35 +0000 Subject: [PATCH 2/2] Bump version to 0.3.0 [ci skip] --- CHANGELOG.md | 2 +- Gemfile.lock | 2 +- Rakefile | 23 +++++++++++++++++++++++ example/App/Info.plist | 2 +- example/AppTests/Info.plist | 2 +- lib/version.rb | 2 +- 6 files changed, 28 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f52cc0..4c80951 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## Next release +## 0.3.0 * Update the markdown and plist files in `Pods/Target Support Files`. * Support wildcard characters in the excluded filenames. diff --git a/Gemfile.lock b/Gemfile.lock index fb759fc..bf2ee84 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - cocoapods-acknowledgements-addons (0.2.0) + cocoapods-acknowledgements-addons (0.3.0) cocoapods (>= 0.36) cocoapods-acknowledgements diff --git a/Rakefile b/Rakefile index 793ba5c..d41da71 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,26 @@ +desc "Bump versions" +task :bump, [:version] do |t, args| + version = args[:version] + unless version + puts %{Usage: rake "bump[version]"} + next + end + + Dir.chdir("example") { sh "xcrun agvtool new-marketing-version #{version}" } + + spec = "lib/version.rb" + text = File.read spec + File.write spec, text.gsub(%r(\"\d+\.\d+\.\d+\"), "\"#{version}\"") + puts "Updated #{spec} to #{version}" + + changelog = "CHANGELOG.md" + text = File.read changelog + File.write changelog, text.gsub(%r(Next release), "#{version}") + puts "Updated #{changelog} to #{version}" + + Rake::Task["install"].execute +end + desc "Launch the example app" task :example do Rake::Task["install"].execute diff --git a/example/App/Info.plist b/example/App/Info.plist index c567c0f..81f4e96 100644 --- a/example/App/Info.plist +++ b/example/App/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.2.0 + 0.3.0 CFBundleVersion 1 LSRequiresIPhoneOS diff --git a/example/AppTests/Info.plist b/example/AppTests/Info.plist index b0aed4e..14f8bbd 100644 --- a/example/AppTests/Info.plist +++ b/example/AppTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 0.2.0 + 0.3.0 CFBundleVersion 1 diff --git a/lib/version.rb b/lib/version.rb index 1a32087..2c00264 100644 --- a/lib/version.rb +++ b/lib/version.rb @@ -1,5 +1,5 @@ module CocoaPodsAcknowledgements module AddOns - VERSION = "0.2.0" + VERSION = "0.3.0" end end