28

我认为更新 Meteor 可能会破坏我的应用程序。它工作正常,然后我运行了流星更新,现在它不工作了。我可以做类似的事情meteor downgrade吗?

4

5 回答 5

39

Meteor 0.6.0 及更高版本附带了一个新的分发系统。您现在可以将--release参数传递给任何 Meteor 命令,它将针对请求的版本运行。例如,要将您的应用程序与 Meteor 0.6.1 捆绑在一起,请运行:meteor bundle --release 0.6.1. 值得注意的是,这仅适用于 0.6.0 之后的版本。

如果您想将您的应用固定到特定版本,请运行meteor update --release <release>:这会修改.meteor/release您的应用程序目录中的文件。然后像往常一样简单地运行 Meteor。当有新版本可用时,您仍会收到通知。

于 2013-04-11T16:16:28.133 回答
6

更新:从 Meteor 0.6.0 开始,此功能无需使用 Meteorite 即可使用。请参阅Avital 的答案。(对于 > 0.6.0 的版本。要在低于 0.6.0 的版本上使用功能,您仍然可以使用 Meteorite:

如果您想使用您的应用程序控制版本(因此您现有的应用程序仍然可以使用旧版本或 0.57.1​​(带有安全错误修复),您可以使用陨石:https ://github.com/oortcloud/meteorite

通过安装它npm install -g meteorite

它对来自http://atmosphere.meteor.com的大量其他软件包也很有帮助。

要控制您的应用程序的版本,请将您的 smart.json 编辑为:

{
    "meteor": {
        "tag": "v0.5.7"
    }
}

只有您已经制作的应用程序会受到影响,您可以在准备好后对其进行升级。

于 2013-03-17T19:42:46.657 回答
0

I have tried this and it is very hard. My best advice is to try and copy all the files from an app running the version you want, then paste your app's code in there.

于 2015-12-14T01:45:45.980 回答
0

There is no meteor downgrade command from its CLI. The best and easy way if you have version control like GIT, just undo your recent changes by git stash save, and run meteor again.

于 2016-06-18T05:45:48.317 回答
0

On Windows, I was able to effectively "downgrade" from a failed upgrade by editing the version number to a previous working release in the file:

C:\Users\Paul\AppData\Local.meteor\meteor.bat

You need to change it to a version which has a corresponding folder in: .meteor\packages\meteor-tool

于 2017-02-28T05:29:31.300 回答