Skip to content
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

Add --add-sources option #177

Merged
merged 2 commits into from
Mar 1, 2022
Merged

Add --add-sources option #177

merged 2 commits into from
Mar 1, 2022

Conversation

divadretlaw
Copy link
Contributor

Adds an optional --add-sources option that adds the source to the generated output. Defaults to false.

  • GitHub sources are generated using the owner and name
  • CocoaPods source is generated via the pod name and links to https://cocoapods.org
  • Manual sources already have an optional source flag, which is used when adding sources

Comment on lines 9 to 16
public let source: String?

public init(name: String, nameSpecified: String?, version: String?) {
self.name = name
self.nameSpecified = nameSpecified
self.version = version
self.source = "https://cocoapods.org/pods/\(name)"
}
Copy link
Owner

@mono0926 mono0926 Mar 1, 2022

Choose a reason for hiding this comment

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

@divadretlaw

How about this?

Suggested change
public let source: String?
public init(name: String, nameSpecified: String?, version: String?) {
self.name = name
self.nameSpecified = nameSpecified
self.version = version
self.source = "https://cocoapods.org/pods/\(name)"
}
public var source: String? { "https://cocoapods.org/pods/\(name)" }

This is a common point in other public let source: String? line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems good, then we can drop the custom initializer.

@mono0926 mono0926 merged commit 81438cb into mono0926:main Mar 1, 2022
@mono0926
Copy link
Owner

mono0926 commented Mar 1, 2022

@divadretlaw

Thanks, released now: https://github.com/mono0926/LicensePlist/releases/tag/3.19.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants