From ea5b9927454ed667f6a0f4d52f9294e4d3c7d92e Mon Sep 17 00:00:00 2001 From: Bryan Summersett Date: Thu, 29 Nov 2018 20:25:59 -0800 Subject: [PATCH 1/2] Use process unique temporary so we don't get duplicate temporary path writes --- Sources/XcodeGenKit/FileWriter.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/XcodeGenKit/FileWriter.swift b/Sources/XcodeGenKit/FileWriter.swift index 82cafa7f..2ce3c415 100644 --- a/Sources/XcodeGenKit/FileWriter.swift +++ b/Sources/XcodeGenKit/FileWriter.swift @@ -13,7 +13,7 @@ public class FileWriter { public func writeXcodeProject(_ xcodeProject: XcodeProj, to projectPath: Path? = nil) throws { let projectPath = project.defaultProjectPath - let tempPath = Path.temporary + "XcodeGen_\(Int(NSTimeIntervalSince1970))" + let tempPath = try Path.processUniqueTemporary() + "XcodeGen" try? tempPath.delete() if projectPath.exists { try projectPath.copy(tempPath) From 309fce30361190c76a7aedd7b8d438b94b67b78a Mon Sep 17 00:00:00 2001 From: Bryan Summersett Date: Thu, 29 Nov 2018 21:27:24 -0800 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6e86805..09954c9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Fixed XPC Service package type [#435](https://github.com/yonaskolb/XcodeGen/pull/435) @alvarhansen - Fixed phase ordering for modulemap and static libary header Copy File phases. [402](https://github.com/yonaskolb/XcodeGen/pull/402) @brentleyjones - Add `.intentdefinition` files to sources build phase instead of resources [#442](https://github.com/yonaskolb/XcodeGen/pull/442) @yonaskolb +- Fixed intermittent errors when running multiple `xcodegen`s concurrently [#450](https://github.com/yonaskolb/XcodeGen/pull/450) @bryansum #### Changed - Changed spelling of build phases to **preBuildPhase** and **postBuildPhase**. [402](https://github.com/yonaskolb/XcodeGen/pull/402) @brentleyjones