- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在为我的 iOS 应用程序设置 CI,但我遇到了一些问题。
Example values are shown with each setting. Schedule: Choose to run manually, periodically, on new commits, or on trigger scripts.
最佳答案
有一个Continuous Integration Guide可在 Apple 开发者网站上找到,该网站提供了有关如何设置 CI 构建的详细说明。但是,它缺少有关触发脚本的详细信息。
为此,最好的文档可以在 OSX Server 脚本本身中找到。 Apple 在此处使用的术语“触发脚本”指的是 Git 中的 post-receive Hook 。 Git 事件 Hook 可以添加到任何 Git 存储库的 .git/hooks 子目录中,以执行操作以响应包含它们的 Git 存储库上的事件。
要查看专门“启动”Xcode 服务以运行 CI 构建的示例 post-receive Hook ,请在托管 Xcode 构建服务的服务器上创建托管 Git 存储库。默认情况下,添加到 Xcode 服务器的 Git 存储库将自动创建一个接收后 Hook 。在这种情况下,它是一个 Ruby 脚本,POST
转至 http://localhost/xcs/kick-commit-bots
与 repository
和 branch
表单字段设置为存储库的 URL(因为它是在 Xcode 服务中配置的)和要分别拉取的分支。
因此,按照 Xcode 持续集成指南中概述的步骤创建托管存储库,然后查看 /Library/Server/Xcode/Repositories/git/<your project>.git/hooks/post-receive
的内容在 Xcode 服务器上。如果您在其他地方托管您的 Git 项目(例如 BitBucket、GitHub 或本地网络上的 linux 机器),您可以在使用您选择的脚本语言创建自己的接收后 Hook 时使用此文件作为指南。
对于那些无法在其构建服务器上创建托管存储库的人的示例:
#!/usr/bin/env ruby
##
# Copyright (c) 2014 Apple Inc. All Rights Reserved.
#
# IMPORTANT NOTE: This file is licensed only for use on Apple-branded
# computers and is subject to the terms and conditions of the Apple Software
# License Agreement accompanying the package this file is a part of.
# You may not port this file to another platform without Apple's written consent.
#
# IMPORTANT NOTE: This file is licensed only for use with the Wiki Server feature
# of the Apple Software and is subject to the terms and conditions of the Apple
# Software License Agreement accompanying the package this file is part of.
##
# fill in the exact URL to your repository, as entered in your OS X Server configuration
$repository_url = "file:///git/python-lrparser.git"
$repository_mode = "git"
# fill in the hostname of your OS X Server machine; this must be accessible by the server
# on which your repository is hosted; you may use "localhost" for the local machine
#server_host = "server.example.com"
$server_host = "localhost"
##########################################
## DO NOT EDIT BELOW THIS LINE
##########################################
require 'net/http'
def kick(branch)
theURL = URI("http://#{$server_host}/xcs/kick-commit-bots")
if branch.nil?
Net::HTTP.post_form(theURL, 'repository' => $repository_url)
else
Net::HTTP.post_form(theURL, 'repository' => $repository_url, 'branch' => branch)
end
end
if __FILE__ == $0
# determine what branch this is a push to, if possible
branches = []
if $repository_mode == "git"
$stdin.each_line do |line|
oldrev, newrev, ref = line.strip.split
if ref =~ %r{^refs/heads/(.+)$}
branches.push($~[1])
end
end
elsif $repository_mode == "svn" and ARGV.length >= 2
repository = ARGV[0]
revision = ARGV[1]
modifiedDirs = `svnlook dirs-changed -r #{revision} #{repository}`.lines.map { |line| line.chomp }
modifiedDirs.each do |d|
if d =~ %r{branches/([^/]+)}
branches.push($~[1])
end
end
end
# if we have no branch information, just kick generically
puts "Notifying OS X Server..."
if branches.empty?
kick(nil)
else
# otherwise, do a targeted kick for each relevant branch
branches.each do |branch|
kick(branch)
end
end
end
关于continuous-integration - 机器人的自定义触发脚本(Xcode 5 CI),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19995339/
我的对话 fragment 有问题。我想使用 android:onClick 属性,因为在我看来代码更清晰。 在我的布局中,我有以下声明: 现在我的 DialogFragment import an
我正在制作一个使用谷歌地图的应用程序,我的主要 xml 代码 fragment 如下: 我的java代码是: import android.os.Bundle; import com.googl
是否可以在一个应用程序中有两个单独的首选项?我有一个在运行时连接到外部可执行文件(引擎)的应用程序。应用程序有自己的偏好,引擎也有。这两者不能混用,因为下次用户可能会决定加载具有不同偏好的完全不同的引
这是“Google Catalogs”应用程序的快照。我只是想知道我们如何进行这种图像重叠。![enter image description here][1] 最佳答案 您可以使用 FrameLay
我制作了一个 GridView ,其中添加了图像。但我的问题是它显示的 gridview 尺寸非常小,其中只有 3 张图像,就像图片中那样,我想在其中显示 9 张图像。 小号 但我希望 gridvie
我目前正在学习如何在 Android 上创建和使用服务。我查看了 android SDK 以获得进一步的帮助,我发现了 android:enable=[true |假]。 在SDK中是这样说的: Th
在完成我的 Android 游戏时,我希望用户将他/她的分数与高分进行比较。为此,我将当前的最高分存储在 SQLite 数据库中。但我认为我的方法(似乎可行)笨拙且丑陋: //in the final
出于某种原因,谷歌没有为模拟器提供任何通知声音,我找不到任何关于如何加载通知声音的引用。 我遇到过这个线程:How to play ringtone/alarm sound in Android但是除
我的应用有以下样式: true #ffffff true 它在我使用的大多数手机上运行良好。 (LG G5、Nexus 5、Moto G)但是当我在 LeEco Pro
我想确保我的网站阻止 Selenium 和 QTP 等自动化工具。有没有办法做到这一点 ?网站上的哪些设置会导致 Selenium 失败? 最佳答案 适当考虑对原始问题“你到底为什么要这样做?”的评论
我正在处理我的联系表,我希望它尽可能地防止垃圾邮件。我正在使用一些方法作为反击: 使用 JavaScript 正则表达式验证电子邮件的合法性 验证所有字段是否具有足够的值 制作一个不可见的字段来吸引机
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, over
我正在制作一个 android 应用程序,我需要在我的应用程序中显示远程图像我使用以下代码。但图像未显示: for(int i=0;i
我有几个与 Android 操作系统中的 AIML 集成相关的问题。我对 Java 了解不多,但我对 AIML 了解很多。我制作了 AIML 文件,现在我想做的是制作一个可以加载文件并在 GUI 中运
我有一个具有“登录”和“注销”操作的应用程序。用户登录后,在他们注销时堆栈中可能还剩下任意数量的 Activity 。 当用户注销时,我希望重置所有应用程序状态。我清除了我的磁盘缓存和首选项,但在运行
我是 Android 应用程序开发的新手,我正在尝试开发一个可用的应用程序。但是我创建的这个页面自创建以来就出现了问题,我真的希望有人能帮助我解决这个问题。每次我运行这个程序时,应用程序都会关闭。 这
我尝试将 android:imeOptions 设置为 actionSend、actionSearch。但是键盘上没有“发送”或“搜索”按钮,只有普通的“Enter”键。我还尝试设置不同的输入类型。
我想创建一种方法来查看相机坐标的中心是否在某个区域的边界内,如果是,则执行一些操作。 当我尝试这样做时,出现错误:Operator !不能应用于 LatLngBounds。 我也试过 if(temp
我正在尝试将视频录制时长限制为 5 秒。我正在使用默认相机和此代码: intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 5); 现在它在三星 S6 上工
我正在开发一款安卓游戏 https://code.google.com/p/something-soft/我的日志猫说它正试图激发游戏的 Intent ,但随后主线程似乎死了(出现 ActivityN
我是一名优秀的程序员,十分优秀!