diff options
author | Jay Doane <jaydoane@apache.org> | 2021-04-19 21:56:51 -0700 |
---|---|---|
committer | Jay Doane <jaydoane@apache.org> | 2021-04-20 00:12:58 -0700 |
commit | 1afcfc2a40a6fa17b5497f9c194f38fe297ee681 (patch) | |
tree | a9a74acbace3df709b9a8baff6ad3d28a990b524 | |
parent | 1199069eaec49217e19f22353b7d012c8f91f6b9 (diff) | |
download | couchdb-1afcfc2a40a6fa17b5497f9c194f38fe297ee681.tar.gz |
Build and escriptize weatherreportweatherreport
-rw-r--r-- | Makefile | 19 | ||||
-rw-r--r-- | rebar.config.script | 1 | ||||
-rw-r--r-- | rel/reltool.config | 3 | ||||
-rw-r--r-- | src/weatherreport/rebar.config | 2 |
4 files changed, 23 insertions, 2 deletions
@@ -99,7 +99,7 @@ TEST_OPTS="-c 'startup_jitter=0' -c 'default_security=admin_local'" .PHONY: all # target: all - Build everything -all: couch fauxton docs +all: couch fauxton docs escriptize .PHONY: help @@ -136,6 +136,13 @@ endif fauxton: share/www +.PHONY: escriptize +# target: escriptize - Build CLI tools +escriptize: couch + @$(REBAR) -r escriptize apps=weatherreport + @cp src/weatherreport/weatherreport bin/weatherreport + + ################################################################################ # Testing ################################################################################ @@ -147,6 +154,7 @@ check: all python-black @$(MAKE) eunit @$(MAKE) mango-test @$(MAKE) elixir + @$(MAKE) weatherreport-test ifdef apps subdirs = $(apps) @@ -296,6 +304,13 @@ mango-test: devclean all .venv/bin/python3 -m pip install -r requirements.txt @cd src/mango && ../../dev/run "$(TEST_OPTS)" -n 1 --admin=testuser:testpass '.venv/bin/python3 -m nose --with-xunit' + +.PHONY: weatherreport-test +# target: weatherreport-test - Run weatherreport against dev cluster +weatherreport-test: devclean escriptize + @dev/run -n 1 -a adm:pass --no-eval \ + 'bin/weatherreport --etc dev/lib/node1/etc --level error' + ################################################################################ # Developing ################################################################################ @@ -353,6 +368,7 @@ release: all @echo "Installing CouchDB into rel/couchdb/ ..." @rm -rf rel/couchdb @$(REBAR) generate # make full erlang release + @cp bin/weatherreport rel/couchdb/bin/weatherreport ifeq ($(with_fauxton), 1) @mkdir -p rel/couchdb/share/ @@ -401,6 +417,7 @@ clean: @$(REBAR) -r clean @rm -rf .rebar/ @rm -f bin/couchjs + @rm -f bin/weatherreport @rm -rf src/*/ebin @rm -rf src/*/.rebar @rm -rf src/*/priv/*.so diff --git a/rebar.config.script b/rebar.config.script index f12ef3842..6fb42e425 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -139,6 +139,7 @@ SubDirs = [ "src/rexi", "src/setup", "src/smoosh", + "src/weatherreport", "rel" ]. diff --git a/rel/reltool.config b/rel/reltool.config index 70f7bbcb9..924ecd6b2 100644 --- a/rel/reltool.config +++ b/rel/reltool.config @@ -61,6 +61,7 @@ setup, smoosh, snappy, + weatherreport, %% extra recon ]}, @@ -121,6 +122,7 @@ {app, setup, [{incl_cond, include}]}, {app, smoosh, [{incl_cond, include}]}, {app, snappy, [{incl_cond, include}]}, + {app, weatherreport, [{incl_cond, include}]}, %% extra {app, recon, [{incl_cond, include}]} @@ -135,6 +137,7 @@ {copy, "../src/couch/priv/couchjs", "bin/couchjs"}, {copy, "../share/server/main.js", "share/server/main.js"}, {copy, "../share/server/main-coffee.js", "share/server/main-coffee.js"}, + {copy, "../src/weatherreport/weatherreport", "bin/weatherreport"}, {copy, "files/sys.config", "releases/\{\{rel_vsn\}\}/sys.config"}, {copy, "files/vm.args", "releases/\{\{rel_vsn\}\}/vm.args"}, {template, "overlay/etc/default.ini", "etc/default.ini"}, diff --git a/src/weatherreport/rebar.config b/src/weatherreport/rebar.config index 7b1a9d348..983755adf 100644 --- a/src/weatherreport/rebar.config +++ b/src/weatherreport/rebar.config @@ -28,4 +28,4 @@ {escript_shebang, "#!/usr/bin/env escript\n"}. {escript_comment, "%% -nocookie\n"}. -{escript_incl_apps, [config]}. +{escript_incl_apps, [config, couch_log, couch_stats]}. |