从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/
答案 0 :(得分:0)
sign-and-upload.sh
需要执行权限才是对的。但你的回答是改变一些不同的文件!你需要添加
- chmod +x scripts/sign-and-upload.sh