Generate an .xcscheme file from the command line

后端 未结 4 626
攒了一身酷
攒了一身酷 2021-02-04 07:53

I am working on my company\'s continuous integration server, and the build process is failing because the server does not have access to schemes in an xcode project.

Bas

4条回答
  •  我寻月下人不归
    2021-02-04 08:31

    I generate the XCode project using the -G Xcode too; I'm using the scan-build plugin ( http://blog.manbolo.com/2014/04/15/automated-static-code-analysis-with-xcode-5.1-and-jenkins ) in jenkins. It requires the workspace files. My script to launch & watch xcode looks like that: ($WORKSPACE is set by jenkins)

    #!/bin/bash
    
    /Applications/Xcode.app/Contents/MacOS/Xcode "${WORKSPACE}/Build/arangodb.xcodeproj" &
    XCODE_PID=$!
    
    # now we wait for xcode to build the workspace:
    WAIT_FOR_XCODE=0
    while test ${WAIT_FOR_XCODE} -lt 6; do
        WAIT_FOR_XCODE=`find "${WORKSPACE}/Build/arangodb.xcodeproj" |wc -l`
        sleep 2
        COUNT=`ps -p ${XCODE_PID} |wc -l`
        if test ${COUNT} -lt 2; then 
            echo "XCode went away unexpectedly!"
            exit -1
        fi
    done
    
    #ok, we believe its done. kill it, and wait until its realy dead.
    kill ${XCODE_PID}
    COUNT=2;
    while test ${COUNT} -gt 1; do 
        sleep 1
        COUNT=`ps -p ${XCODE_PID} |wc -l`
    done
    

提交回复
热议问题