是否有可能跳过Heroku上单个git push的资产预编译步骤? [英] Is it possible to skip the asset precompile step for a single git push on Heroku?

查看:111
本文介绍了是否有可能跳过Heroku上单个git push的资产预编译步骤?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  $ git push heroku master 
...
---->为Rails资产管道准备应用程序
运行:rake资产:预编译
资产预编译完成(189.17s)
...

有时我想进行推送,我知道不会更改任何资产,例如控制器的快速修补程序。是否有可能跳过资产:预编译单步推送到Heroku的步骤?



谢谢。

解决方案

当然!您需要在 your_app / pubilc / assets 目录中创建 manifest.yml

该文件可以是空白的。但理想情况下,您在本地预编译所有内容,因此部署到Heroku的速度会更快。



确保您还提交了 manifest.yml 文件,当你推送到Heroku。就像 git add -f your_app / pubilc / assets / manifest.yml 和一个 git push heroku master 就足够了。

Every time I deploy my Rails 3.2 project to Heroku, rake assets:precompile is run:

$ git push heroku master  
...
----> Preparing app for Rails asset pipeline
      Running: rake assets:precompile
      Asset precompilation completed (189.17s)
...

Sometimes I want to make a push that I know does not change any assets, such as a quick hotfix to a controller. Is it possible to skip the asset:precompile step for a single git push to Heroku?

Thanks.

解决方案

Sure! You'll need to create a manifest.yml in your_app/pubilc/assets directory.

The file can be blank. But ideally, you precompile everything locally, so deploys to Heroku would be much faster.

Make sure that you also committed the manifest.yml file when you're pushing to Heroku. Something like git add -f your_app/pubilc/assets/manifest.yml and a git push heroku master should suffice.

这篇关于是否有可能跳过Heroku上单个git push的资产预编译步骤?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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