部署iOS应用程序的权限问题使用travis ci

时间:2015-11-03 11:11:02

标签: ios travis-ci

  1. .travis.yml已经过验证
  2. Travis CI构建成功。
  3. Xcode 7.1.1,Mac OSX El Capitan 10.11 Beta
  4. 冷杉:http://fir.im

    https://www.objc.io/issues/6-build-tools/travis-ci/#encrypt-certificates-and-profiles

    取得这些进展

    **建立成功** 然后我尝试部署到冷杉,我从特拉维斯CI收到:

    /Users/travis/build.sh: line 41: ./scripts/sign-and-upload.sh: Permission denied
    

    我认为文件" sign-and-upload.sh"没有获得许可。所以我给这些文件适当的权限:

    before_install:
    - chmod +x scripts/add-key.sh
    - chmod +x scripts/remove-key.sh
    

    但它仍然失败。

    这是add-key.sh:

    #!/bin/sh
    security create-keychain -p travis ios-build.keychain
    security default-keychain -s ios-build.keychain
    security unlock-keychain -p travis ios-build.keychain
    security set-keychain-settings -t 3600 -l ~/Library/Keychains/ios-build.keychain
    
    security import ./scripts/certs/apple.cer -k ~/Library/Keychains/ios-build.keychain -T /usr/bin/codesign
    security import ./scripts/certs/dist.cer -k ~/Library/Keychains/ios-build.keychain -T /usr/bin/codesign
    security import ./scripts/certs/dist.p12 -k ~/Library/Keychains/ios-build.keychain -P 123 -T /usr/bin/codesign
    mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
    cp ./scripts/profile/$PROFILE_NAME.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/
    

1 个答案:

答案 0 :(得分:0)

sign-and-upload.sh需要执行权限才是对的。但你的回答是改变一些不同的文件!你需要添加

- chmod +x scripts/sign-and-upload.sh