From d4ff56ee0dc1b5d028dbb754c27daecc4fabe3b6 Mon Sep 17 00:00:00 2001 From: YuanSheng Wang Date: Mon, 14 Oct 2019 15:21:13 +0800 Subject: [PATCH] luarocks: support to install apisix without dashboard. (#686) * luarocks: support to install apisix without dashboard. --- .travis/linux_runner.sh | 2 +- Makefile | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis/linux_runner.sh b/.travis/linux_runner.sh index 9b2bab678c8c..bf1dfeb74e3a 100755 --- a/.travis/linux_runner.sh +++ b/.travis/linux_runner.sh @@ -17,7 +17,7 @@ export_or_prefix() { } create_lua_deps() { - sudo luarocks make --lua-dir=${OPENRESTY_PREFIX}/luajit rockspec/apisix-dev-1.0-0.rockspec --tree=deps --only-deps --local + WITHOUT_DASHBOARD=1 sudo luarocks make --lua-dir=${OPENRESTY_PREFIX}/luajit rockspec/apisix-dev-1.0-0.rockspec --tree=deps --only-deps --local sudo luarocks install --lua-dir=${OPENRESTY_PREFIX}/luajit lua-resty-libr3 --tree=deps --local echo "Create lua deps cache" sudo rm -rf build-cache/deps diff --git a/Makefile b/Makefile index 130342eb7e00..6159b8777b7e 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ dev: ifeq ($(UNAME),Darwin) luarocks install --lua-dir=$(LUA_JIT_DIR) rockspec/apisix-dev-1.0-0.rockspec --tree=deps --only-deps --local else ifneq ($(LUAROCKS_VER),'luarocks 3.') - luarocks install rockspec/apisix-dev-1.0-0.rockspec --tree=deps --only-deps --local + WITHOUT_DASHBOARD=1 luarocks install rockspec/apisix-dev-1.0-0.rockspec --tree=deps --only-deps --local else luarocks install --lua-dir=/usr/local/openresty/luajit rockspec/apisix-dev-1.0-0.rockspec --tree=deps --only-deps --local endif @@ -99,6 +99,7 @@ reload: ### install: Install the apisix .PHONY: install install: +ifneq ($(WITHOUT_DASHBOARD),1) $(INSTALL) -d /usr/local/apisix/dashboard cd `mktemp -d /tmp/apisix.XXXXXX` && \ git clone https://github.com/iresty/apisix.git && \ @@ -106,6 +107,7 @@ install: git submodule update --init --recursive && \ cp -r dashboard/* /usr/local/apisix/dashboard chmod -R 755 /usr/local/apisix/dashboard +endif $(INSTALL) -d /usr/local/apisix/logs/ $(INSTALL) -d /usr/local/apisix/conf/cert