Skip to content

Commit

Permalink
Merge branch 'release/0.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
bcylin committed Feb 13, 2020
2 parents b9d28f0 + 82aeda2 commit c6efa35
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 9 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# 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
* 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

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
cocoapods-acknowledgements-addons (0.2.0)
cocoapods-acknowledgements-addons (0.3.0)
cocoapods (>= 0.36)
cocoapods-acknowledgements

Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).

Expand All @@ -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.

Expand All @@ -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:

```
Expand Down
23 changes: 23 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion example/App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.2.0</string>
<string>0.3.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
2 changes: 1 addition & 1 deletion example/App/MethodSwizzler.m
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion example/AppTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.2.0</string>
<string>0.3.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion lib/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module CocoaPodsAcknowledgements
module AddOns
VERSION = "0.2.0"
VERSION = "0.3.0"
end
end

0 comments on commit c6efa35

Please sign in to comment.