gpt4 book ai didi

elixir - 无法调用任务 "distillery.release"

转载 作者:行者123 更新时间:2023-12-03 21:58:57 26 4
gpt4 key购买 nike

我正在研究几个不同的 How-Tos(项目中的主要内容以及通过 Google 搜索的几个),以便 edeliver 部署代码,但我找不到此问题的解决方案 Could not invoke task "distillery.release": 1 error found!问题:

$ mix edeliver build release

BUILDING RELEASE OF HELLO_WORLD APP ON BUILD HOST

-----> Authorizing hosts
-----> Ensuring hosts are ready to accept git pushes
-----> Pushing new commits with git to: abc@company.com
-----> Resetting remote hosts to b8a7e8d2098b228f693352a0ebc59fa5c708f7a3
-----> Cleaning generated files from last build
-----> Updating git submodules
-----> Fetching / Updating dependencies
-----> Compiling sources
-----> Generating release
using mix to generate release
** (Mix) Could not invoke task "distillery.release": 1 error found!
--verbosity : Unknown option

A remote command failed on:

abc@company.com

Output of the command is shown above and the command executed
on that host is printed below for debugging purposes:

FAILED with exit status 1:

[ -f ~/.profile ] && source ~/.profile
set -e
cd /tmp/erlang/hello-world/builds
if [ "mix" = "rebar" ]; then
echo "using rebar to generate release"
./rebar -f generate
elif [ "mix" = "relx" ]; then
echo "using relx to generate release"
./relx release
elif [ "mix" = "mix" ]; then
echo "using mix to generate release"
MIX_ENV="prod" LINK_SYS_CONFIG="" LINK_VM_ARGS="" APP="hello_world" AUTO_VERSION="commit-count+git-revision+branch-unless-master" BRANCH="master" SKIP_RELUP_MODIFICATIONS="" RELUP_MODIFICATION_MODULE="" USING_DISTILLERY="" mix do release.version , distillery.release --verbosity=verbose
fi

设置
  • 二郎22
  • Elixir 1.10.2(使用 Erlang/OTP 21 编译)

  • $ mix phx.new hello_world --no-ecto

    mix.exs
    ...
    def application do
    [
    mod: {HelloWorld.Application, []},
    extra_applications: [:logger, :runtime_tools, :edeliver]
    ]
    end
    ...
    defp deps do
    [
    {:phoenix, "~> 1.4.16"},
    {:phoenix_pubsub, "~> 1.1"},
    {:phoenix_html, "~> 2.11"},
    {:phoenix_live_reload, "~> 1.2", only: :dev},
    {:gettext, "~> 0.11"},
    {:jason, "~> 1.0"},
    {:plug_cowboy, "~> 2.0"},
    {:edeliver, ">= 1.8.0"},
    {:distillery, "~> 2.1", warn_missing: false}
    ]
    end
    ...

    .deliver/config
    APP="hello_world" # name of your release

    # The applicationis build here:
    BUILD_HOST="www.hello-world.de" # host where to build the release
    BUILD_USER="deployer" # local user at build host
    BUILD_AT="/tmp/erlang/hello-world/builds" # build directory on build host

    # Staging
    STAGING_HOSTS=""
    STAGING_USER=""

    # This is the place where it's going to be hosted:
    PRODUCTION_HOSTS="www.hello-world.de" # deploy / production hosts separated by space
    PRODUCTION_USER="deployer" # local user at deploy hosts
    DELIVER_TO="/home/deployer/phoenix-systems" # deploy directory on production hosts

    AUTO_VERSION=commit-count+git-revision+branch-unless-master # https://github.com/edeliver/edeliver/wiki/Auto-Versioning


    # For *Phoenix* projects, symlink prod.secret.exs to our tmp source
    pre_erlang_get_and_update_deps() {
    local _prod_secret_path="/home/deployer/hello-world.prod.secret.exs"
    if [ "$TARGET_MIX_ENV" = "prod" ]; then
    __sync_remote "
    ln -sfn '$_prod_secret_path' '$BUILD_AT/config/prod.secret.exs'
    "
    fi
    }

    杂项:

    $ mix do deps.get, compile
    $ echo ".deliver/releases/" >> .gitignore
    $ git init
    $ git add -a
    $ git commit -m "Setting up edeliver"

    我复制了 /home/deployer/hello-world.prod.secret.exs到构建和生产服务器。

    $ mix release.init
    * creating rel/vm.args.eex
    * creating rel/env.sh.eex
    * creating rel/env.bat.eex
    $ git add .
    $ git commit -m "release config"

    比我开始 mix edeliver build release并得到错误。

    最佳答案

    相关线路是:

    ** (Mix) Could not invoke task "distillery.release": 1 error found!
    --verbosity : Unknown option


    --verbosity选项是 deprecatedv2 .

    每个酒厂文件:

    The --verbosity flag no longer exists, use --silent, --quiet or --verbose.



    它看到无法识别的选项并失败。不幸的是,它恰好出现在 delivery 提供的shell 脚本中。本身(对吗?还是你的?)。
    MIX_ENV="prod" [...] mix do release.version ,  distillery.release --verbosity=verbose

    无论如何,构建服务器上似乎有些困惑。我不确定为什么它会不一致,但也许完全清理会有所帮助。

    关于elixir - 无法调用任务 "distillery.release",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60703154/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com