Prechádzať zdrojové kódy

chore(build): no deterministic compile flag for non-prod profiles

Zaiming Shi 4 rokov pred
rodič
commit
e2c2f39bc2
1 zmenil súbory, kde vykonal 8 pridanie a 3 odobranie
  1. 8 3
      rebar.config.erl

+ 8 - 3
rebar.config.erl

@@ -44,9 +44,7 @@ filter_extra_deps([{Plugin, _} = P | More], Filter, Acc) ->
 
 
 overrides() ->
 overrides() ->
     [ {add, [ {extra_src_dirs, [{"etc", [{recursive,true}]}]}
     [ {add, [ {extra_src_dirs, [{"etc", [{recursive,true}]}]}
-            , {erl_opts, [ deterministic
-                         , {compile_info, [{emqx_vsn, get_vsn()}]}
-                         ]}
+            , {erl_opts, [{compile_info, [{emqx_vsn, get_vsn()}]}]}
             ]}
             ]}
     ] ++ community_plugin_overrides().
     ] ++ community_plugin_overrides().
 
 
@@ -118,19 +116,26 @@ prod_compile_opts() ->
     | common_compile_opts()
     | common_compile_opts()
     ].
     ].
 
 
+prod_overrides() ->
+    [{add, [ {erl_opts, [deterministic]}]}].
+
 profiles() ->
 profiles() ->
     Vsn = get_vsn(),
     Vsn = get_vsn(),
     [ {'emqx',          [ {erl_opts, prod_compile_opts()}
     [ {'emqx',          [ {erl_opts, prod_compile_opts()}
                         , {relx, relx(Vsn, cloud, bin)}
                         , {relx, relx(Vsn, cloud, bin)}
+                        , {overrides, prod_overrides()}
                         ]}
                         ]}
     , {'emqx-pkg',      [ {erl_opts, prod_compile_opts()}
     , {'emqx-pkg',      [ {erl_opts, prod_compile_opts()}
                         , {relx, relx(Vsn, cloud, pkg)}
                         , {relx, relx(Vsn, cloud, pkg)}
+                        , {overrides, prod_overrides()}
                         ]}
                         ]}
     , {'emqx-edge',     [ {erl_opts, prod_compile_opts()}
     , {'emqx-edge',     [ {erl_opts, prod_compile_opts()}
                         , {relx, relx(Vsn, edge, bin)}
                         , {relx, relx(Vsn, edge, bin)}
+                        , {overrides, prod_overrides()}
                         ]}
                         ]}
     , {'emqx-edge-pkg', [ {erl_opts, prod_compile_opts()}
     , {'emqx-edge-pkg', [ {erl_opts, prod_compile_opts()}
                         , {relx, relx(Vsn, edge, pkg)}
                         , {relx, relx(Vsn, edge, pkg)}
+                        , {overrides, prod_overrides()}
                         ]}
                         ]}
     , {check,           [ {erl_opts, common_compile_opts()}
     , {check,           [ {erl_opts, common_compile_opts()}
                         ]}
                         ]}