Merge pull request #544 from tomquist/fix-generation-order

Fix order of file generation
This commit is contained in:
Yonas Kolb
2019-04-07 20:39:53 +10:00
committed by GitHub
2 changed files with 10 additions and 3 deletions
+1
View File
@@ -11,6 +11,7 @@
#### Fixed
- Fixed `optional` file sources not being added to the project [#557](https://github.com/yonaskolb/XcodeGen/pull/557) @yonaskolb
- Fixed order of file generation. Plists are now generated before the project is generated so that the project includes the generated plists [#544](https://github.com/yonaskolb/XcodeGen/issues/544) @tomquist
## 2.4.0
+9 -3
View File
@@ -111,6 +111,15 @@ class GenerateCommand: Command {
throw GenerationError.validationError(error)
}
// generate plists
info("⚙️ Generating plists...")
let fileWriter = FileWriter(project: project)
do {
try fileWriter.writePlists()
} catch {
throw GenerationError.writingError(error)
}
// generate project
info("⚙️ Generating project...")
let xcodeProject: XcodeProj
@@ -124,10 +133,7 @@ class GenerateCommand: Command {
// write project
info("⚙️ Writing project...")
do {
let fileWriter = FileWriter(project: project)
try fileWriter.writeXcodeProject(xcodeProject, to: projectPath)
try fileWriter.writePlists()
success("Created project at \(projectPath)")
} catch {
throw GenerationError.writingError(error)