html在线发布ipa文件在哪里,如何生成HTML文件給下載鏈接manifest.plist文件,以便安裝ipa到iPhone...

我已經給予jenkins.Use臨時配置文件包括設備的全局路徑使用詹金斯使用xcbuild packageApplication通過Xcode的iPhone項目建設UDID.It正在成功生成ipa文件,但我們如何使用jenkins中的html文件分發它。我編寫了一個shell腳本來生成清單和其他jenkins設置,並且它工作正常。我的代碼如下: -如何生成HTML文件給下載鏈接manifest.plist文件,以便安裝ipa到iPhone

建立構建_參數

ef6587be069e57e18f0bed37c32144d3.png

成立後建立詹金斯配置操作。

abc05df2ba81e0fb77e435e7855874a3.png

#!/bin/sh

function fail {

echo "$*" >&2

exit 1

}

function section_print {

echo "\n=== $* ==="

}

section_print "Building $CONFIGURATION";

if [ -z $CONFIGURATION ]; then

fail "No configuration specified";

exit 1;

fi

#strange way to force backslash

if [ $PROJDIR ]; then

PROJDIR=${PROJDIR%/}

PROJDIR="$PROJDIR/"

section_print "Project Dir is specified and is $PROJDIR"

cd "$PROJDIR" || fail "no directory $PROJDIR"

pwd

fi

section_print "Unlocking keychain"

security unlock-keychain -p "password" ~/Library/Keychains/login.keychain

section_print "Cleaning build"

xcodebuild -configuration "$CONFIGURATION" clean || fail "Clean failed"

section_print "Building $CONFIGURATION"

xcodebuild -configuration "$CONFIGURATION"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk || fail "Build failed"

section_print "Packaging ipa"

BUILD_PATH=build/"$CONFIGURATION"-iphoneos

#we are already in the $PROJDIR

cd "$BUILD_PATH" || fail "no directory 'build/$CONFIGURATION-iphoneos'"

for file in "*.app"

do

APP_NAME=`echo $file`

done

APP_NAME=${APP_NAME%.*}

section_print "Removing old artefacts"

cd "$WORKSPACE"

rm -f *.ipa

rm -f *.dSYM.zip

rm -f *.mobileprovision

#take $PROJDIR into account

section_print "Application name $APP_NAME"

cd "$PROJDIR$BUILD_PATH"

rm -rf Payload

rm -f "$APP_NAME".*.ipa

mkdir Payload

cp -Rp "$APP_NAME.app" Payload/

if [ -f "$WORKSPACE"/iTunesArtwork ]; then

cp -f "$WORKSPACE"/iTunesArtwork Payload/iTunesArtwork

fi

IPA_FILE="$APP_NAME.$BUILD_ID.$BUILD_NUMBER.ipa"

zip -r "$IPA_FILE" Payload

section_print "Compressing dSYM"

rm -f "*.dSYM.zip"

DSYM_FILE="$APP_NAME.$BUILD_ID.$BUILD_NUMBER.dSYM.zip"

zip -r "$DSYM_FILE" "$APP_NAME.app.dSYM"

section_print "Exporting profile"

cp -f "$APP_NAME.app/embedded.mobileprovision" profile.mobileprovision

section_print "Get the profile name"

PROFILE_NAME=`strings ./profile.mobileprovision | grep -A1 'Name' | tail -n1 | awk -F'' '{print $2}' | awk -F'' '{print $1}'`

PROFILE_NAME=${PROFILE_NAME//'*'/}

PROFILE_NAME=${PROFILE_NAME//'?'/}

PROFILE_NAME="$PROFILE_NAME.mobileprovision"

section_print "Profile name is $PROFILE_NAME"

mv -f "profile.mobileprovision" "$PROFILE_NAME"

rm -f "$WORKSPACE/*.mobileprobision" || fail "Failed to remove $WORKSPACE/*.mobileprovision"

rm -f "$WORKSPACE/$IPA_FILE" || fail "Failed to remove $WORKSPACE/$IPA_FILE"

section_print "Copying $IPA_FILE to artifacts"

cp -v "$IPA_FILE" "$WORKSPACE/." || fail "Failed to copy ipa"

cp -v "$PROFILE_NAME" "$WORKSPACE/." || fail "Failed to copy profile"

cp -v "$DSYM_FILE" "$WORKSPACE/." || fail "Failed to copy dSYM"

section_print "Build succeeded"

#creating manifest.plist file to download ipa file

if [ -d "${WORKSPACE}/$JOB_NAME" ]; then

rm -r ${WORKSPACE}/$JOB_NAME

fi

mkdir ${WORKSPACE}/$JOB_NAME

cp $WORKSPACE/icon.png ${WORKSPACE}/$JOB_NAME/Icon-57.png

cp $WORKSPACE/[email protected] ${WORKSPACE}/$JOB_NAME/Icon-512.png

TARGET_NAME=$APP_NAME

info_plist=$(ls ${WORKSPACE}/*/*-Info.plist)

bundle_version=$(defaults read $info_plist CFBundleShortVersionString)

bundle_id=$(defaults read $info_plist CFBundleIdentifier)

cat < ${WORKSPACE}/manifest2.plist

items

assets

kind

software-package

url

http://192.168.0.237:8080/job/$JOB_NAME/ws/$IPA_FILE

kind

display-image

needs-shine

url

${WORKSPACE}/$JOB_NAME/Icon-57.png

kind

full-size-image

needs-shine

url

${WORKSPACE}/$JOB_NAME/Icon-512.png

metadata

bundle-identifier

$bundle_id

bundle-version

$bundle_version #$BUILD_NUMBER

kind

software

title

$APP_NAME

EOF

2013-05-29

Warewolf

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值