无法从7.9.4升级gitlab

时间:2015-06-11 08:23:44

标签: ruby upgrade gitlab

根据这个:

https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/upgrader.md

我尝试升级我的实例。以前曾经工作过:

git@myhost:~/gitlab$ ruby -Ilib -e 'require "gitlab/upgrader"' -e 'class Gitlab::Upgrader' -e 'def latest_version_raw' -e '"vX.X.X"' -e 'end' -e 'end' -e 'Gitlab::Upgrader.new.execute' -- -y
GitLab 7 upgrade tool
Your version is 7.9.4
Latest available version for GitLab 7 is Unknown
/home/git/gitlab/lib/gitlab/upgrader.rb:30:in `>=': comparison of Gitlab::VersionInfo with Gitlab::VersionInfo failed (ArgumentError)
    from /home/git/gitlab/lib/gitlab/upgrader.rb:30:in `latest_version?'
    from /home/git/gitlab/lib/gitlab/upgrader.rb:11:in `execute'
    from -e:7:in `<main>'

我不太了解ruby,但我认为'vX.X.X'有问题,因为最新版本是7.11.2。该脚本现已弃用,但我不想使用omnibus包。

1 个答案:

答案 0 :(得分:2)

只需将vX.X.X替换为最新的版本标记即可。对于7.11.3,命令是

engine.getLoadWorker().stateProperty().addListener(
        new ChangeListener<State>() {
        @Override
        public void changed(ObservableValue ov, State oldState, State newState) {
            if (newState == State.SUCCEEDED) {
                engine.executeScript(
   "var myParam = location.search.split('find=')[1];"
 + "doSearch(myParam);function doSearch(text) {\n" +
   "        if (window.find && window.getSelection) {\n" +
   "        document.designMode = \"on\";\n" +
   "        var sel = window.getSelection();\n" +
   "        sel.collapse(document.body, 0);\n" +
   "\n" +
   "        while (window.find(text)) {\n" +
   "            document.execCommand(\"HiliteColor\", false, \"yellow\");\n" +
   "            sel.collapseToEnd();\n" +
   "        }\n" +
   "        document.designMode = \"off\";\n" +
   "    } else if (document.body.createTextRange) {\n" +
   "        var textRange = document.body.createTextRange();\n" +
   "        while (textRange.findText(text)) {\n" +
   "            textRange.execCommand(\"BackColor\", false, \"yellow\");\n" +
   "            textRange.collapse(false);\n" +
   "        }\n" +
   "    }\n" +
   "}");
            }
        }
    });