浏览代码

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.

正在加载...
取消
保存