美文网首页
jekins IOS 打包脚本

jekins IOS 打包脚本

作者: 流星阁 | 来源:发表于2020-07-10 09:54 被阅读0次

部分命令

打开文件vi /usr/local/opt/jenkins/homebrew.mxcl.jenkins.plist

修改默认端口号

启动jenkins:brew services start jenkins

停止jenkins:brew services stop jenkins

重启Jenkins:brew services restart jenkins

更新:切换到目录cd ~/.jenkins,然后用最新下载的war包替换文件夹中的war


cocospods脚本

#!/bin/bash -l

export LANG=en_US.UTF-8

export LANGUAGE=en_US.UTF-8

export LC_ALL=en_US.UTF-8

pod install --verbose --no-repo-update


archive脚本


APP_NAME="jekinsDemo1" #工程名

# 证书,如果自动选择证书,设为“iPhone Developer”即可

CODE_SIGN_DEVELOPER="iPhone Developer"

# info.plist路径

project_infoplist_path="./${APP_NAME}/Info.plist"

#取版本号

bundleShortVersion=$(/usr/libexec/PlistBuddy -c "print CFBundleShortVersionString" "${project_infoplist_path}")

#取build值

bundleVersion=$(/usr/libexec/PlistBuddy -c "print CFBundleVersion" "${project_infoplist_path}")

DATE="$(date +%Y%m%d)"

IPANAME="${APP_NAME}_V${bundleShortVersion}_${DATE}.ipa"

#要上传的ipa文件路径

IPA_PATH="$HOME/${IPANAME}"

echo ${IPA_PATH}

#echo "${IPA_PATH}">> text.txt

#集成有Cocopods的用法

echo "=================clean================="

xcodebuild -workspace "${APP_NAME}.xcworkspace" -scheme "${APP_NAME}"  -configuration 'Release' clean

echo "+++++++++++++++++build+++++++++++++++++"

xcodebuild -workspace "${APP_NAME}.xcworkspace" -scheme "${APP_NAME}" -sdk iphoneos -configuration 'Release' CODE_SIGN_IDENTITY="${CODE_SIGN_DEVELOPER}" SYMROOT='$(PWD)'

xcrun -sdk iphoneos PackageApplication "$(PWD)/Release-iphoneos/${APP_NAME}.app" -o ~/Desktop/iPAs/"${IPANAME}"


上传蒲公英
http://www.pgyer.com/doc/view/jenkins_plugin

相关文章

网友评论

      本文标题:jekins IOS 打包脚本

      本文链接:https://www.haomeiwen.com/subject/kaspcktx.html