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

查看:21
本文介绍了无需推送或配置更改即可重新编译 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.

我为什么要这样做?:

我在 Heroku 上将 Cedar 堆栈用于 Rails 3.2 应用程序,但我遇到了 rake assets:precompile 任务失败的问题(仅在编译期间 --- 后来它在heroku 运行).我高度怀疑这是由于在 slug 编译期间某些环境变量不可用,我认为 heroku labs:enable 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 功能后,配置更改不会触发 slug 的重新编译,而且我的代码没有更改,所以我没有任何新的提交要推送.

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.

谢谢!

推荐答案

Slug 编译是通过 git pre-recieve 钩子调用的,因此重新编译的唯一方法是推送新的提交.

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

为了完整起见,请参阅关于 Heroku 的这篇关于 slug 编译器的文章.在 Compilation 标题下讨论了使用 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天全站免登陆