简体   繁体   English

运行早午餐构建和测试后推入git repo

[英]Run brunch build and tests after to push into a git repo

Anybody knows a way to do the following: (Using brunch) 任何人都知道如何做到以下几点:(使用早午餐)

  • push my app to one git repo 将我的应用推送到一个git repo
  • execute the optimise, tests, jshint 执行optimize,tests,jshint
  • finally deploys the app 最后部署应用程序

Is a plugin the only way? 插件是唯一的方法吗?

You could have a: 你可以有一个:

A nice trick, on the repo representing your deployed app, is to add an attribute which will minify all css files. 在代表您部署的应用程序的repo上,一个很好的技巧是添加一个将缩小所有css文件的属性。
See " Compress JS/CSS files on deploy using Git " 请参阅“ 使用Git部署时压缩JS / CSS文件


My point is: if you need to trigger anything, even with grunt, you need to do so from a git commit. 我的观点是:如果你需要触发任何东西,即使是grunt,你需要从git提交中执行。

Paul Miller comments : 保罗米勒 评论

You don't have to code anything. 您不必编写任何代码。
brunch build will do the linting and stuff. brunch build将做linting和东西。 Just put it as git hook. 把它作为git钩子。

That would be in a post-update hook then, with a cd to a non-bare repo in which you would: 那将是一个更新后的钩子,用一张CD到一个非裸仓库,你可以:

unset GIT_DIR
git pull
brunch build

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM