Skip to content

Commit 358911d

Browse files
authored
Merge branch 'master' into fix/configfiles-synced-folder-duplicate
2 parents 6e737ae + 90dfa9d commit 358911d

File tree

6 files changed

+35
-4
lines changed

6 files changed

+35
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## Next Version
44

5+
## 2.45.3
6+
7+
### Fixed
8+
- Fix folder source PBXFileReference path regression with createIntermediateGroups #1605 @yonaskolb
9+
- Fix synced folders: includes silently ignored + no deduplication across targets #1604 @4brunu
10+
511
## 2.45.2
612

713
### Fixed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
TOOL_NAME = XcodeGen
22
export EXECUTABLE_NAME = xcodegen
3-
VERSION = 2.45.2
3+
VERSION = 2.45.3
44

55
PREFIX = /usr/local
66
INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ swift run xcodegen
112112
Add the following to your Package.swift file's dependencies:
113113

114114
```swift
115-
.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.45.2"),
115+
.package(url: "https://github.com/yonaskolb/XcodeGen.git", from: "2.45.3"),
116116
```
117117

118118
And then import wherever needed: `import XcodeGenKit`

Sources/XcodeGen/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import ProjectSpec
33
import XcodeGenCLI
44
import Version
55

6-
let version = Version("2.45.2")
6+
let version = Version("2.45.3")
77
let cli = XcodeGenCLI(version: version)
88
cli.execute()

Sources/XcodeGenKit/SourceGenerator.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,9 @@ class SourceGenerator {
792792
try makePathRelative(for: sourceReference, at: path)
793793
} else if createIntermediateGroups {
794794
createIntermediaGroups(for: sourceReference, at: sourcePath)
795-
try makePathRelative(for: sourceReference, at: sourcePath)
795+
if type != .folder {
796+
try makePathRelative(for: sourceReference, at: sourcePath)
797+
}
796798
}
797799

798800
return sourceFiles

Tests/XcodeGenKitTests/SourceGeneratorTests.swift

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,29 @@ class SourceGeneratorTests: XCTestCase {
998998
try pbxProj.expectFileMissing(paths: ["Sources", "A", "a.swift"])
999999
}
10001000

1001+
$0.it("generates folder references with createIntermediateGroups") {
1002+
let directories = """
1003+
Sources:
1004+
A:
1005+
- a.resource
1006+
- b.resource
1007+
"""
1008+
try createDirectories(directories)
1009+
1010+
let target = Target(name: "Test", type: .application, platform: .iOS, sources: [
1011+
TargetSource(path: "Sources/A", type: .folder),
1012+
])
1013+
let project = Project(
1014+
basePath: directoryPath,
1015+
name: "Test",
1016+
targets: [target],
1017+
options: .init(createIntermediateGroups: true)
1018+
)
1019+
1020+
let pbxProj = try project.generatePbxProj()
1021+
try pbxProj.expectFile(paths: ["Sources", "Sources/A"], names: ["Sources", "A"], buildPhase: .resources)
1022+
}
1023+
10011024
$0.it("adds files to correct build phase") {
10021025
let directories = """
10031026
A:

0 commit comments

Comments
 (0)