فهرست منبع

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
banjun 5 سال پیش
والد
کامیت
66f5a00ae6
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      SwiftGRPC-Carthage.xcodeproj/xcshareddata/xcschemes/SwiftGRPC-Package.xcscheme
  2. 2 2
      fix-carthage-paths.rb

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

@@ -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"

+ 2 - 2
fix-carthage-paths.rb

@@ -8,7 +8,7 @@ project = Xcodeproj::Project.open(project_path)
 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|
@@ -40,6 +40,6 @@ dependenciesGroup.recursive_children_groups.each do |child|
     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