ソースを参照

conditionally write lockfile on vsn change

pull/2232/head
Fred Hebert 5年前
コミット
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.

読み込み中…
キャンセル
保存