From a71a06130591c77d0bc1d695281f7168d8559d16 Mon Sep 17 00:00:00 2001 From: J Phani Mahesh Date: Mon, 27 Feb 2017 14:01:20 +0530 Subject: [PATCH] add app.src,rebar.lock, ignores for rebar3 Having src/emqttd.app.src allows rebar family of build tools (rebar2, and rebar3) to be used to compile emqttd. This is important to allow plugins to be written using rebar3, to lock dependencies. rebar.lock contains references to commits or hashes of dependencies and is used by rebar3 to allow repeatable builds. This is important since without it, updates to dependencies are silently pulled and it is impractical to replicate a build properly. However, this adds an additional maintenance effort. Periodically, the lock file must be updated using rebar3 upgrade, and app.src must be updated when adding new dependencies. Note that erlang.mk does not respect dependency locking currently, and does not benefit from rebar.lock. _build is used by rebar3 and mix for storing built artifacts. --- .gitignore | 3 +++ rebar.lock | 32 ++++++++++++++++++++++++++++++++ src/emqttd.app.src | 8 ++++++++ 3 files changed, 43 insertions(+) create mode 100644 rebar.lock create mode 100644 src/emqttd.app.src diff --git a/.gitignore b/.gitignore index 8bbf0a28b..b78d533e5 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,6 @@ ct.coverdata emqttd.iml _rel/ data/ +_build +.rebar3 +rebar3.crashdump diff --git a/rebar.lock b/rebar.lock new file mode 100644 index 000000000..e5d182bad --- /dev/null +++ b/rebar.lock @@ -0,0 +1,32 @@ +[{<<"esockd">>, + {git,"https://github.com/emqtt/esockd", + {ref,"6ef597f16ce242fe37ae019d6ff5214f7a784c80"}}, + 0}, + {<<"gen_logger">>, + {git,"https://github.com/emqtt/gen_logger.git", + {ref,"f6e9f2f373d99f41ffe0579ab5a5f3b19472c9c5"}}, + 1}, + {<<"goldrush">>, + {git,"https://github.com/basho/goldrush.git", + {ref,"8f1b715d36b650ec1e1f5612c00e28af6ab0de82"}}, + 1}, + {<<"gproc">>, + {git,"https://github.com/uwiger/gproc", + {ref,"01c8fbfdd5e4701e8e4b57b0c8279872f9574b0b"}}, + 0}, + {<<"lager">>, + {git,"https://github.com/basho/lager", + {ref,"81eaef0ce98fdbf64ab95665e3bc2ec4b24c7dac"}}, + 0}, + {<<"lager_syslog">>, + {git,"https://github.com/basho/lager_syslog", + {ref,"126dd0284fcac9b01613189a82facf8d803411a2"}}, + 0}, + {<<"mochiweb">>, + {git,"https://github.com/emqtt/mochiweb", + {ref,"af27c0c90bf4c1bfeae0290e4c541264b69f7168"}}, + 0}, + {<<"syslog">>, + {git,"git://github.com/Vagabond/erlang-syslog", + {ref,"0e4f0e95c361af298c5d1d17ceccfa831efc036d"}}, + 1}]. diff --git a/src/emqttd.app.src b/src/emqttd.app.src new file mode 100644 index 000000000..c86af2a0a --- /dev/null +++ b/src/emqttd.app.src @@ -0,0 +1,8 @@ +{application, emqttd, [ + {description, "Erlang MQTT Broker"}, + {vsn, "2.1.0"}, + {modules, []}, + {registered, [emqttd_sup]}, + {applications, [kernel,stdlib,gproc,lager,esockd,mochiweb,lager_syslog]}, + {mod, {emqttd_app, []}} +]}.