无法将bot存档上传到测试航班api

时间:2014-11-10 22:34:46

标签: ios continuous-integration testflight xcode-server

总之我: 买了一个mac mini并用OS X Server进行设置,连接了我的git hub repos,创建了一个机器人,它将存档并上传到提交时测试飞行api(仅为了测试)。

我可以通过post post archive脚本获得实际创建的存档,但我无法将其上传到测试版。我的问题在于时间安排,而我对这个过程并不了解。

我已经在SO和Google中使用了许多脚本,但它们似乎都不适用于Xcode 6和Server 4.我必须改变一些路径才能使它工作。

基本上,当我想将其上传到测试航班时,我无法获得新IPA的路径。在我的脚本运行完毕之后,该路径似乎不存在。我认为这是因为在集成日志中,它显示脚本已完成且无法上传到测试航班,但随后在日志的最后打印出来:

'/var/folders/5t/5vbf87x514l3ql2mpfqthgt8000086/T/C437286E-F5F4-4AF7-8F74-58312D095B42-87064-00004C27156D38DE/ServerTest.ipa'的结果

将导出的产品移至'/ Library / Developer / XcodeServer / Integrations / Integration-9279f091e32c0f0299d526e76e1c6b27 / ServerTest Bot.ipa' **出口成功**

所以我知道如何获得这条道路,但是在我已经需要之前,这条道路似乎并不存在。

有什么想法?

更新:还尝试使用此脚本,完全相同的问题 Is there any automatic Testflight upload script on application archiving?

TEAM_TOKEN="XXX"
DISTRIBUTION_LISTS="XXX"
PROVISIONING_PROFILE="/Library/Developer/XcodeServer/ProvisioningProfiles/XXX.mobileprovision"

SIGNING_IDENTITY="iPhone Distribution: XXX"

# DO NOT EDIT BELOW HERE!
########################################
DSYM="/tmp/Archive.xcarchive/dSYMs/${PRODUCT_NAME}.app.dSYM"

#IPA="/tmp/${PRODUCT_NAME}.ipa"
IPA="${XCS_OUTPUT_DIR}/${PRODUCT_NAME} Bot.ipa"

APP="/tmp/Archive.xcarchive/Products/Applications/${PRODUCT_NAME}.app"

# Clear out any old copies of the Archive
echo "Removing old Archive files from /tmp...";
/bin/rm -rf /tmp/Archive.xcarchive*

#Copy over the latest build the bot just created
echo "Copying latest Archive to /tmp/...";
#LATESTBUILD=$(ls -1rt /Library/Server/Xcode/Data/BotRuns | tail -1)
#bin/cp -Rp "/Library/Server/Xcode/Data/BotRuns/${LATESTBUILD}/output/Archive.xcarchive" "/tmp/"

/bin/cp -Rp "${XCS_OUTPUT_DIR}/Archive.xcarchive" "/tmp/"

echo "Creating .ipa for ${PRODUCT_NAME}"
/bin/rm "${IPA}"
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${APP}" -o "${IPA}" --sign             "${SIGNING_IDENTITY}" --embed "${PROVISIONING_PROFILE}"

echo "Done with IPA creation."

echo "Zipping .dSYM for ${PRODUCT_NAME}"
/bin/rm "${DSYM}.zip"
/usr/bin/zip -r "${DSYM}.zip" "${DSYM}"

echo "Created .dSYM for ${PRODUCT_NAME}"

echo "*** Uploading ${PRODUCT_NAME} to TestFlight ***"
/usr/bin/curl "http://testflightapp.com/api/builds.json" \
-F file=@"${IPA}" \
-F dsym=@"${DSYM}.zip" \
-F api_token="${API_TOKEN}" \
-F team_token="${TEAM_TOKEN}" \
-F distribution_lists="${DISTRIBUTION_LISTS}" \
-F notes="Build uploaded automatically from Xcode Server Bot."

echo "TestFlight upload finished!"

0 个答案:

没有答案