MeetYouDevs / cocoapods-imy-bin

1.05k stars 245 forks source link

framework_builder中的xcodebuild方法没有执行导致#81号issue #99

Closed miroda closed 3 years ago

miroda commented 3 years ago

`def xcodebuild(defines = '', args = '', build_dir = 'build', build_model = 'Debug')

    unless File.exist?("Pods.xcodeproj") #cocoapods-generate v2.0.0
      command = "xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{File.join(File.expand_path("..", build_dir), File.basename(build_dir))} clean build -configuration #{build_model} -target #{target_name} -project ./Pods/Pods.xcodeproj 2>&1"
    else
      command = "xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{build_dir} clean build -configuration #{build_model} -target #{target_name} -project ./Pods.xcodeproj 2>&1"
    end

    UI.message "command = #{command}"
    output = `#{command}`.lines.to_a

    if $CHILD_STATUS.exitstatus != 0
      raise <<~EOF
        Build command failed: #{command}
        Output:
        #{output.map { |line| "    #{line}" }.join}
      EOF

      Process.exit
    end
  end `
miroda commented 3 years ago

command = "xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{File.join(File.expand_path("..", build_dir), File.basename(build_dir))} clean build -configuration #{build_model} -target #{target_name} -project ./Pods/Pods.xcodeproj 2>&1"

这行代码完全么有执行,我在本地rake install本地的代码到系统去的时候,只是生成了一个字符串,而没有执行代码

dabing1022 commented 3 years ago
 UI.message "command = #{command}"
 output = `#{command}`.lines.to_a

这个是执行