Fixed adding Info.plists with custom names to Copy Bundle Resources build phase (#945)

* Fixed adding Info.plists with custom names to Copy Bundle Resources build phase

- Extended check for Info.plist, because they usually named not just "Info.plist", but "<TargetName>-Info.plist"

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
This commit is contained in:
Vasiliy Anisimov 2021-01-11 05:33:44 +03:00 committed by GitHub
parent 04d6749441
commit 282761cb21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -17,6 +17,9 @@
#### Fixed
- Remove force-unwrapping causing crash for `LegacyTarget`s [#982](https://github.com/yonaskolb/XcodeGen/pull/982) @jcolicchio
#### Changed
- **Breaking**: Info.plists with custom prefixes are no longer added to the Copy Bundle Resources build phase [#945](https://github.com/yonaskolb/XcodeGen/pull/945) @anivaros
## 2.18.0
#### Added

View File

@ -250,7 +250,7 @@ class SourceGenerator {
/// returns a default build phase for a given path. This is based off the filename
private func getDefaultBuildPhase(for path: Path, targetType: PBXProductType) -> BuildPhaseSpec? {
if path.lastComponent == "Info.plist" {
if path.lastComponent.hasSuffix("Info.plist") {
return nil
}
if let buildPhase = getFileType(path: path)?.buildPhase {