英文:
Is there a golang post-commit build process
问题
有没有人知道已经完成的脚本,可以用于在提交后构建GO源代码,以便我可以按需推送到我的测试/生产服务器?
英文:
Is anyone aware of an already done script that is useable for git post-commit building of GO source code so I can push to my test/prod servers on demand?
答案1
得分: 4
这看起来不像是一个构建后的git触发器,更像是一个持续集成的问题,你可以将你的Go项目(如这篇博客文章中所描述的)链接到以下平台:
- travis.org(如这里所述)
- drone.io(如这里提到的)
还有wecker,它也支持部署。
在本地,你可以使用goconvey来检查你的代码是否编译成功并且测试通过。
然后,如果这些测试都通过了,你可以将代码推送到服务器上(即“按需”),但你不需要一个钩子来实现这个。
英文:
This looks less than a post-build git trigger, and more as a continuous integration question, where you could link your go project (as described in this blog post) to:
- travis.org (as described here)
- drone.io (as mentioned here)
But also wecker, which does support deployment as well.
Locally, you could check goconvey which allows you to see if your code compile and your tests pass.
Then, if those tests are green, you can push yo your server (so "on demand"), but you don't need a hook for that.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论