Running xcodebuild from a forked terminal

前端 未结 13 1161
说谎
说谎 2020-12-02 04:20

I\'m trying to setup an automated build server for an iPhone application. I\'d like to be able to have nightly adhoc beta builds so that testers can follow the development.<

13条回答
  •  不思量自难忘°
    2020-12-02 05:13

    Ok, the problem was two things for me, 1st was unlocking the keychain;

    security unlock-keychain login.keychain
    

    Second was (empty) passphrase,

    security import blahblahbackup.p12 -k login.keychain -T /usr/bin/codesign -P ""
    

    UPDATE: A had a little problem later, when the script is triggered from a web script or sth. like that. It just sees /Library/Keychains/System.chain. So i found a dirty workaround (which may lead to security issues but ok for me);

    • setup pubkey ssh login (from user that wants to call build script, to actual user which has certificates and will run xcodebuild) in my case, it's same user. Apache is working as someuser and everything for build is setup on someuser.
    • and my php script (for triggering build) was calling ~/build-script. I've changed that like this:

      ssh someuser@localhost ~/build-script

    so it works in a real tty, and all keychain is accessible, everything works fine.

提交回复
热议问题