heroku-buildpack-elixir
heroku-buildpack-elixir copied to clipboard
GIT_DISCOVERY_ACROSS_FILESYSTEM not set
src : https://git.pleroma.social/pleroma/pleroma
remote: * Stack heroku-18
remote: * Erlang 21.2
remote: * Elixir 1.7
$ cat elixir_buildpack.config
erlang_version=21.2
elixir_version=1.7
always_rebuild=false
runtime_path=/app
$ git push heroku master
remote: -----> Fetching app dependencies with mix
remote: fatal: not a git repository (or any parent up to mount point /)
remote: Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
$GIT_DIR is empty, $git_dir_value is also empty.
There is no .git directory in $build_path.
lib/app_funcs.sh
# https://github.com/HashNuke/heroku-buildpack-elixir/blob/master/lib/app_funcs.sh#L71
function app_dependencies() {
# Unset this var so that if the parent dir is a git repo, it isn't detected
# And all git operations are performed on the respective repos
local git_dir_value=$GIT_DIR
unset GIT_DIR
cd $build_path
output_section "Fetching app dependencies with mix"
mix deps.get --only $MIX_ENV || exit 1
export GIT_DIR=$git_dir_value
cd - > /dev/null
}
It seems that the mix command is not working.
$ pwd
/tmp/build_xxxxxxxxxxxxx
$ which mix
/tmp/build_xxxxxxxxxxxxx/.platform_tools/elixir/bin/mix
$ mix deps.get --only $MIX_ENV || exit 1
fatal: not a git repository (or any of the parent directories): .git
Can not execute mix on ${build_path} .
It can be run with ${build_pack_path} .
@syui Is everything alright with your build now or are you still stuck with this issue?
There is still the same problem.
Can not execute mix from $ {build_path}.
It moves when it does in this way.
https://github.com/syui/heroku-buildpack-elixir/blob/master/lib/app_funcs.sh
I tried using @syui fork and was able to sort this issue, a PR for this would be fantastic
Certainly the problem can be solved, But I don't really know a lot about that.
If any of you can contribute a PR and test it out, I would be happy to merge it in.
I'd be glad but to be honest, I got this issue when trying to deploy Pleroma on Heroku (same as @syui) and then found @syui's fork. At best, I can only assert this fix worked for me.