- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经使用 jenkins 通过 xcode iphone 项目构建,使用 xcbuild packageApplication 将其全局路径提供给 jenkins。使用临时配置文件,包括设备 UDID。它成功生成了 ipa 文件,但我们如何在 jenkins 中使用 html 文件分发它。我已经编写了一个 shell 脚本来生成 list 和其他 jenkins 设置并且它工作正常。我的代码如下:-
设置构建_参数化
在 jenkins 配置中设置构建后操作。
#!/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 '<key>Name</key>' | tail -n1 | awk -F'<string>' '{print $2}' | awk -F'</string>' '{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/icon@2x.png ${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 << EOF > ${WORKSPACE}/manifest2.plist
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0" mimeType="application/xml">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>http://192.168.0.237:8080/job/$JOB_NAME/ws/$IPA_FILE</string>
</dict>
<dict>
<key>kind</key>
<string>display-image</string>
<key>needs-shine</key>
<true/>
<key>url</key>
<string>${WORKSPACE}/$JOB_NAME/Icon-57.png</string>
</dict>
<dict>
<key>kind</key>
<string>full-size-image</string>
<key>needs-shine</key>
<true/>
<key>url</key>
<string>${WORKSPACE}/$JOB_NAME/Icon-512.png</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>$bundle_id</string>
<key>bundle-version</key>
<string>$bundle_version #$BUILD_NUMBER</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>$APP_NAME</string>
</dict>
</dict>
</array>
</dict>
</plist>
EOF
最佳答案
附加代码以在shell脚本中创建html文件
cat << EOF > ${WORKSPACE}/download.html
<html>
<body>
<h1>Download IPA Here</h1>
<a href="itms-services://?action=download-manifest&url=http://192.168.0.237:8080/job/$JOB_NAME/ws/manifest2.plist" mimeType="application/octet-stream">
<b>Install App</b>
</a>
</body>
</html>
EOF
以及发布 Action 的一些更改显示了工件上的下载文件。
关于shell - 如何生成 html 文件以提供指向 manifest.plist 文件的下载链接以便将 ipa 安装到 iphone,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16805671/
我开发了一个具有基本安全性的 Spring Boot 应用程序。我有两个具有相同路径和不同 http 方法的端点。当我使用默认密码/使用 application.yml 中给出的密码包含基本安全性时,
我的代码是这样的: 或者,像这样: 如果我首先列出 webm 源,Firefox 4 会播放它,但 Firefox 3.6 也会尝试播放它(但会失败,因为它不支持 webm)。
我希望提供一个泛型类型作为类型参数而不首先将其解析为具体类型。换句话说,我正在寻找一种方法来指定从基类继承时可以使用的类型映射函数。 示例(不正确的)语法,希望比我能解释得更好: abstract c
我在 .NET 中编写了一些桌面应用程序,它们既提供了用于正常使用的前端 GUI,也提供了用于其他需求(例如扩展、调度、自动化、高级使用等)的命令行界面。命名两个可执行文件的最佳做法是什么,因为它们构
我最近在这里思考了很多关于屏幕抓取以及它可能是一项什么样的任务。所以我提出以下问题。 作为网站开发人员,您是否会公开简单的 API 以防止用户抓取屏幕,例如 JSON 结果? 然后这些结果可以实现缓存
我正在为一个项目使用 Dojo 1.9,但我不明白 dojo.provide 的正确替代方案与传统风格相比,AMD 风格。我正在阅读 this文档页面。 很明显,这就是旧语法映射到新语法的方式: 旧
我正在开发一个 Angular 应用程序。当我使用 ng serve 正常运行它时,它运行没有任何错误.但是,当我运行 ng build --prod ,它给出了以下错误。 ERROR in Ille
我有一个 Mac 应用程序。在我的 Mac 应用程序中,我的屏幕之一有一个包含文本字段的 scrollView。在同一屏幕上,我有一个需要提供打印选项的按钮。可以打印文本字段的文本。打印按钮应调用 M
我已经成功地为普通媒体文件提供媒体文件,但是当我尝试提供管理媒体文件时,我失败了。请帮我找出问题所在,因为我已经尝试解决问题几个小时但没有运气(也一直在谷歌搜索并阅读有关提供静态文件的 django
我正在尝试创建一个简单的错误处理项目,它会在收到错误(例如 404、422 或 500)后为 JSON 提供错误数据。我使用来自 this 的代码网站,但它不适合我。 我实际上有这两个类: 基本 Co
假设我有一个名为 Number 的类(class),我打算对 Number 进行大量相等比较对象。我担心通用 Number::equals(Object o) 的“开销”(类比较等...)方法。在这种
假定以下情况: 对等方A只希望将音频流发送给对等方B 对等B只希望将视频流发送给对等A 从而, 与创建报价 var sdpConstraints = { “必填”:{ 'OfferToReceiveA
因为我有一些角度,所以我想检查角度模数 360°: double angle = 0; double expectedAngle = 360; angle.Should().B
这是我的程序中构建的 monad 堆栈: type Px a = ReaderT PConf (State PState) a 其中 PConf 和 PState 是保存应用程序的配置和状态的任意数据
因为我有一些角度,所以我想检查角度模数 360°: double angle = 0; double expectedAngle = 360; angle.Should().B
我有一个小程序需要以某些权限运行,这意味着加载时会显示一条警告消息。如果用户拒绝警告消息,我想重定向到错误页面并解释发生了什么。有什么办法可以做到这一点吗? 我研究过让计时器运行并在特定时间段后重定向
从我可以从 Firebase 文档中推断出,似乎需要服务器来提供静态内容(html和 javascript),所以你需要有一台托管机器和一个静态内容服务器在某处启动并运行,或某些服务托管静态站点。 对
关闭。这个问题是opinion-based 。目前不接受答案。 想要改进这个问题吗?更新问题,以便 editing this post 可以用事实和引文来回答它。 . 已关闭 3 年前。 Improv
我的项目根目录的静态文件夹中有一个文本文件。 我想提供它,所以我创建了: @csrf_exempt def display_text(request): content = retur
我目前正在研究指针,为了进一步理解我正在尝试使用指针将两个数值数组连接成一个。代码如下所示。 #include void concat(int **pa,int **pb,int **pc) {
我是一名优秀的程序员,十分优秀!