重新编译Heroku slug,无需进行推送或配置更改 [英] Recompile Heroku slug without push or config change

查看:108
本文介绍了重新编译Heroku slug,无需进行推送或配置更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有办法强制Heroku重新编译slug而不推送新的提交和/或更新配置变量。

I'm wondering if there is a way to force Heroku to recompile the slug without pushing new commits and/or updating the config variables.

为什么我要要做到这一点?:

Why would I want to do this?:

我在Heroku上使用Cedar堆栈来处理Rails 3.2应用程序,并且遇到 rake资产的问题:预编译任务失败(仅在编译期间---稍后它可以正常工作,并且 heroku run )。我高度怀疑这是由于某些环境变量在slug编译期间不可用,我认为 heroku实验:启用user_env_compile 实验性功能将解决此问题。

I am using the Cedar stack on Heroku for a Rails 3.2 app, and I am having problems with the rake assets:precompile task failing (during compilation only --- later it works fine with a heroku run). I highly suspect this is due to certain environment variables not being available during slug compilation time, and I think the heroku labs:enable user_env_compile experimental feature will solve this.

然而,在 user_env_compile 功能开启,配置的改变不会触发蛞蝓的重新编译,和我的代码没有改变,所以我没有任何新的提交推送。

However, with the user_env_compile feature turned on, config changes do not trigger a recompilation of the slug, and my code hasn't changed, so I don't have any new commits to push.

当然,我可以推动一个虚拟提交一个微不足道的改变,可能是最简单的答案---但我想知道是否有一个heroku命令可以让我直接重新编译slug。

Of course, I could push a "dummy" commit with a trivial change, which is probably the simplest answer --- but I'm wondering if there's a heroku command that will let me directly recompile the slug.

谢谢!

推荐答案

弹头编译被调用,有一个git预先收到钩,因此重新编译的唯一方法是推新的提交。

Slug compilation is invoked with a git pre-recieve hook, so the only way to recompile is to push a new commit.

有关完整性参见本文在Heroku为蛞蝓编译。它讨论了使用pre-recieve hook来调用编译标题下的slug编译过程。

For completeness see this article on Heroku for the slug compiler. It discussed the use of the pre-recieve hook to invoke the slug compile process under the Compilation heading.

这篇关于重新编译Heroku slug,无需进行推送或配置更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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