diff --git a/CHANGELOG.md b/CHANGELOG.md index b4f218ed..89918ff3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Sources/XcodeGenCLI/GenerateCommand.swift b/Sources/XcodeGenCLI/GenerateCommand.swift index 43932818..0c51bf29 100644 --- a/Sources/XcodeGenCLI/GenerateCommand.swift +++ b/Sources/XcodeGenCLI/GenerateCommand.swift @@ -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)