问题与TeamCity,xcrun和单引号 [英] issues with TeamCity, xcrun and single quotes
问题描述
我在IOS项目上使用TeamCity with xcrun for CI。我目前在尝试从TC生成步骤执行以下命令时遇到问题:
I'm using TeamCity with xcrun for CI on an IOS project. I'm currently seeing an issues while trying to execute the following command from a TC build step:
-sdk iphoneos PackageApplication "Build/Release-iphoneos/%Product Name%.app" -o "%system.teamcity.build.checkoutDir%/Build/archive.ipa" --sign "iPhone Distribution: AMERICA'S XXXX" --embed "%Provision File%"
我得到的错误是:
错误:/ usr / bin / codesign --force
--preserve-metadata = identifier,entitlements,resource-rules --signiPhone分发:AMERICA'S
--resource -rules = / Library / TeamCity / buildAgent / temp / buildTmp / PotQjg91Ef / Payload / ACCU
Deposit.app/ResourceRules.plist
/ Library / TeamCity / buildAgent / temp / buildTmp / PotQjg91Ef / Payload / ACCU
Deposit.app失败,错误1.输出:iPhone分发:
美国的:没有身份[2013-05-16 14:58:46,533] err -
[2013-05- 16 14:58:46,533] out - [2013-05-16 14:58:46,540] out -
进程退出,代码1
error: /usr/bin/codesign --force --preserve-metadata=identifier,entitlements,resource-rules --sign "iPhone Distribution: AMERICA'S --resource-rules=/Library/TeamCity/buildAgent/temp/buildTmp/PotQjg91Ef/Payload/ACCU Deposit.app/ResourceRules.plist /Library/TeamCity/buildAgent/temp/buildTmp/PotQjg91Ef/Payload/ACCU Deposit.app failed with error 1. Output: "iPhone Distribution: AMERICA'S: no identity found [2013-05-16 14:58:46,533] err - [2013-05-16 14:58:46,533] out - [2013-05-16 14:58:46,540] out - Process exited with code 1
我想很清楚,问题是xcrun处理单引号的方式。我试着加倍单引号美国的,但这没有工作。有人可以帮助我吗?有没有办法逃避单引号在xcrun?
I think is pretty clear that the issue is the way xcrun handles single quotes. I tried doubling the single quote to "AMERICA''S" but that didn't work. Can someone help me out? Is there a way to escape single quotes in xcrun?
推荐答案
您需要引用标志实体 iPhone Distribution:AMERICA's XXXX
使它只作为 - sign
的一个参数,否则它将被空白分隔,并且只能识别第一部分。这是 PackageApplication
做识别命令参数。
You need to quote the sign entity iPhone Distribution: AMERICA'S XXXX
to make it as only one argument for --sign
, otherwise it would be divided by whitespaces and be recognized only the first part. That's what PackageApplication
do to recognize command arguments.
我不知道你的命令的语法,您应该在%Sign Entity%
的变量中放置 iPhone分发:AMERICA的XXXX
。然后整个命令应该是这样:
I do not know the grammar of your command, but it seems that you should put iPhone Distribution: AMERICA'S XXXX
in a variable like %Sign Entity%
. Then the whole command should be like this:
-sdk iphoneos PackageApplicationBuild / Release-iphoneos /%Product Name%.app-o %system.teamcity.build.checkoutDir%/ Build / archive.ipa--sign%Sign Entity%--embed%Provision File%
这篇关于问题与TeamCity,xcrun和单引号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!