Просмотр исходного кода

conditionally write lockfile on vsn change

pull/2232/head
Fred Hebert 5 лет назад
Родитель
Сommit
c9cce688f1
1 измененных файлов: 11 добавлений и 2 удалений
  1. +11
    -2
      src/rebar_config.erl

+ 11
- 2
src/rebar_config.erl Просмотреть файл

@ -114,8 +114,17 @@ warn_vsn_once() ->
%% Only call `write_lock_file/2' if the locks have changed.
maybe_write_lock_file(LockFile, Locks, OldLocks) when Locks =/= OldLocks ->
write_lock_file(LockFile, Locks);
maybe_write_lock_file(_, _, _) ->
ok.
maybe_write_lock_file(LockFile, Locks, Locks) ->
%% rewrite if the configured format would have changed
Terms = consult_file_(LockFile),
case Terms of
[] ->
ok;
[{?CONFIG_VERSION, FileLocks}|_] when is_list(FileLocks) ->
ok;
_ ->
write_lock_file(LockFile, Locks)
end.
%% @doc Converts the internal format for locks into the multi-version
%% compatible one used within rebar3 lock files.

Загрузка…
Отмена
Сохранить