Skip to content

Commit 66f5a00

Browse files
authored
Fix 0.9.1 Carthage Support on Xcode 12.2 (#1053)
* workaround for fix-carthage script * xcode12 pre-actions cause error at swift package resolve by some env values
1 parent 8eac348 commit 66f5a00

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

SwiftGRPC-Carthage.xcodeproj/xcshareddata/xcschemes/SwiftGRPC-Package.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
1111
<ActionContent
1212
title = "Run Script"
13-
scriptText = "cd ${PROJECT_DIR}; swift package resolve; ruby fix-carthage-paths.rb SwiftGRPC-Carthage.xcodeproj">
13+
scriptText = "cd ${PROJECT_DIR}; env -i PATH=/usr/bin swift package resolve; ruby fix-carthage-paths.rb SwiftGRPC-Carthage.xcodeproj&#10;">
1414
<EnvironmentBuildable>
1515
<BuildableReference
1616
BuildableIdentifier = "primary"

fix-carthage-paths.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
dependenciesGroup = project["Dependencies"]
99

1010
#Open dependencies-state.json file
11-
file = File.read(".build/dependencies-state.json")
11+
file = File.read(".build/workspace-state.json")
1212
json = JSON.parse(file)
1313

1414
dependenciesGroup.recursive_children_groups.each do |child|
@@ -40,6 +40,6 @@
4040
end
4141
end
4242

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

0 commit comments

Comments
 (0)