Skip to content

Commit

Permalink
Fix 0.9.1 Carthage Support on Xcode 12.2 (#1053)
Browse files Browse the repository at this point in the history
* workaround for fix-carthage script
* xcode12 pre-actions cause error at swift package resolve by some env values
  • Loading branch information
banjun authored Nov 24, 2020
1 parent 8eac348 commit 66f5a00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "cd ${PROJECT_DIR}; swift package resolve; ruby fix-carthage-paths.rb SwiftGRPC-Carthage.xcodeproj">
scriptText = "cd ${PROJECT_DIR}; env -i PATH=/usr/bin swift package resolve; ruby fix-carthage-paths.rb SwiftGRPC-Carthage.xcodeproj&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
Expand Down
4 changes: 2 additions & 2 deletions fix-carthage-paths.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
dependenciesGroup = project["Dependencies"]

#Open dependencies-state.json file
file = File.read(".build/dependencies-state.json")
file = File.read(".build/workspace-state.json")
json = JSON.parse(file)

dependenciesGroup.recursive_children_groups.each do |child|
Expand Down Expand Up @@ -40,6 +40,6 @@
end
end

File.open(".build/dependencies-state.json","w") do |f|
File.open(".build/workspace-state.json","w") do |f|
f.write(json.to_json)
end

0 comments on commit 66f5a00

Please sign in to comment.