File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 14
14
## Master
15
15
16
16
- Drop Swift 5.3 support [ @417-72KI ] [ ] - [ #524 ] ( https://github.com/danger/swift/pull/524 )
17
+ - Refine runner temporary path to better support concurrent pipelines [ @squarefrog ] [ ] - [ #530 ] ( https://github.com/danger/swift/pull/530 )
17
18
18
19
## 3.13.0
19
20
Original file line number Diff line number Diff line change @@ -9,9 +9,14 @@ func runDanger(logger: Logger) throws {
9
9
// Pull in the JSON from Danger JS
10
10
let standardInput = FileHandle . standardInput
11
11
let fileManager = FileManager . default
12
- let tmpPath = NSTemporaryDirectory ( )
12
+ let tmpPath = NSTemporaryDirectory ( ) + " danger/ \( UUID ( ) . uuidString ) / "
13
13
let dangerResponsePath = tmpPath + " danger-response.json "
14
14
15
+ try fileManager. createDirectory (
16
+ at: URL ( fileURLWithPath: tmpPath) ,
17
+ withIntermediateDirectories: true
18
+ )
19
+
15
20
// Pull in the JSON from Danger JS
16
21
guard let dangerDSLURL = String ( data: standardInput. readDataToEndOfFile ( ) , encoding: . utf8) else {
17
22
logger. logError ( " Could get the Dangerfile DSL URL from STDing " )
@@ -172,8 +177,7 @@ func runDanger(logger: Logger) throws {
172
177
logger. logError ( " Could not get the results JSON file at \( dangerResponsePath) " )
173
178
// Clean up after ourselves
174
179
try ? fileManager. removeItem ( atPath: dslJSONPath)
175
- try ? fileManager. removeItem ( atPath: tempDangerfilePath)
176
- try ? fileManager. removeItem ( atPath: dangerResponsePath)
180
+ try ? fileManager. removeItem ( atPath: tmpPath)
177
181
exit ( 1 )
178
182
}
179
183
You can’t perform that action at this time.
0 commit comments