Roberto Ostinelli 3 лет назад
Родитель
Сommit
c3b5ba2919
6 измененных файлов с 32 добавлено и 4 удалено
  1. 1 0
      .gitignore
  2. 4 0
      docs.config
  3. 15 0
      docs.sh
  4. 9 1
      rebar.config
  5. 2 3
      src/syn.app.src
  6. 1 0
      test/syn_registry_SUITE.erl

+ 1 - 0
.gitignore

@@ -28,3 +28,4 @@ erl_crash.dump
 *.beam
 test/results/*
 !test/results/.keep
+doc/

+ 4 - 0
docs.config

@@ -0,0 +1,4 @@
+{source_url, <<"https://github.com/ostinelli/syn">>}.
+{extras, [<<"LICENSE.md">>]}.
+{main, <<"syn">>}.
+{proglang, erlang}.

+ 15 - 0
docs.sh

@@ -0,0 +1,15 @@
+#!/bin/bash
+set -e
+
+# Setup:
+#
+#     mix escript.install github elixir-lang/ex_doc
+#     asdf install erlang 24.0.2
+#     asdf local erlang 24.0.2
+
+rebar3 compile
+rebar3 as docs edoc
+version=3.0.0
+ex_doc "syn" $version "_build/default/lib/syn/ebin" \
+  --source-ref v${version} \
+  --config docs.config $@

+ 9 - 1
rebar.config

@@ -1 +1,9 @@
-
+{erl_opts, [debug_info]}.
+{deps, []}.
+{profiles, [
+    {docs, [{edoc_opts, [{preprocess, true},
+        {doclet, edoc_doclet_chunks},
+        {layout, edoc_layout_chunks},
+        {dir, "_build/default/lib/syn/doc"}]}
+    ]}
+]}.

+ 2 - 3
src/syn.app.src

@@ -16,8 +16,7 @@
         {env, []},
 
         {licenses, ["MIT"]},
-        {links, [
-            {"Github", "https://github.com/ostinelli/syn"}
-        ]}
+        {links, [{"Github", "https://github.com/ostinelli/syn"}]},
+        {doc, "doc"}
     ]
 }.

+ 1 - 0
test/syn_registry_SUITE.erl

@@ -280,6 +280,7 @@ three_nodes_discover_custom_scope(Config) ->
     %% reconnect node 2
     syn_test_suite_helper:connect_node(SlaveNode2),
     ok = syn_test_suite_helper:wait_cluster_connected([node(), SlaveNode1, SlaveNode2]),
+    timer:sleep(250),
 
     %% check
     assert_scope_subcluster(node(), custom_scope_ab, [SlaveNode1]),