Skip to content

Commit

Permalink
Merge pull request #2169 from hborawski/cocoapods-multi-podspec
Browse files Browse the repository at this point in the history
CocoaPods swap promise.all for reduce to avoid git locking problem
  • Loading branch information
hborawski committed Mar 17, 2022
2 parents 8fd6684 + 1ae8beb commit 5a3ce45
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plugins/cocoapods/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,12 @@ export default class CocoapodsPlugin implements IPlugin {
await this.publishPodSpec(podLogLevel);

// Reset changes to podspec file since it doesn't need to be committed
await Promise.all(
this.paths.map((path) => execPromise("git", ["checkout", path]))
);
await this.paths.reduce(
(promise, path) => promise.then(async () => {
await execPromise("git", ["checkout", path])
}),
Promise.resolve()
)

return canaryVersion;
}
Expand Down

0 comments on commit 5a3ce45

Please sign in to comment.