我将如何使用Travis自动将生成结果更新到Github存储库? [英] How would I use Travis to automatically update a Github repo with result of build?

查看:42
本文介绍了我将如何使用Travis自动将生成结果更新到Github存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真正的需求要复杂一些,但我认为这种简化抓住了本质:

My real need is somewhat more complicated, but I think this simplification captures the essence:

我想做的是,在每个GitHub签入中,如果其余的Travis构建成功,就可以从代码(构成主要源代码的JavaScript的精简版)中创建工件.然后,当然,我希望Travis将其签回到GitHub.

What I would like to do is, on every GitHub check-in, if the rest of the Travis build succeeds, to create an artifact from the code (a minified version of the JavaScript that makes up the main source code.) Then of course, I want Travis to check that back into GitHub.

我还没有尝试过,因为我看到了一个紧迫的问题:无限循环.如果Travis将其签入GitHub,那么Travis当然会注意到另一个签入并运行另一个构建,创建另一个工件...

I haven't tried this yet, because I see an immediate problem: an infinite loop. If Travis checks this into GitHub, then of course Travis would notice another check-in and run another build, create another artifact...

我如何最好避免这种情况?

How could I best avoid this?

推荐答案

Travis将忽略其消息包含 [ci skip] 的所有提交,因此,当您从travis提交缩小的脚本时,请确保消息的一部分.如果您需要更多帮助,我们很乐意提供一些代码示例.

Travis will ignore all commits whose message contains [ci skip], so when you commit the minified scripts from travis make sure that is part of the message. If you need any more help I'd be happy to give some code examples.

这篇关于我将如何使用Travis自动将生成结果更新到Github存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆