This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new b91be9f change: drop the support of shell script installation (#4985)
b91be9f is described below
commit b91be9fef7479e8a59302d88047d02f92291c752
Author: 罗泽轩 <[email protected]>
AuthorDate: Mon Sep 6 19:14:00 2021 +0800
change: drop the support of shell script installation (#4985)
---
bin/apisix | 3 --
ci/linux_apisix_master_luarocks_runner.sh | 18 --------
utils/install-apisix.sh | 76 -------------------------------
3 files changed, 97 deletions(-)
diff --git a/bin/apisix b/bin/apisix
index cfb0e29..d83b0ce 100755
--- a/bin/apisix
+++ b/bin/apisix
@@ -23,9 +23,6 @@ if [ -s './apisix/cli/apisix.lua' ]; then
elif [ -s '/usr/local/share/lua/5.1/apisix/cli/apisix.lua' ]; then
# install via luarock
APISIX_LUA=/usr/local/share/lua/5.1/apisix/cli/apisix.lua
-elif [ -s '/usr/local/apisix/deps/share/lua/5.1/apisix/cli/apisix.lua' ]; then
- # install via shell
- APISIX_LUA=/usr/local/apisix/deps/share/lua/5.1/apisix/cli/apisix.lua
else
# install via official rpm or docker
APISIX_LUA=/usr/local/apisix/apisix/cli/apisix.lua
diff --git a/ci/linux_apisix_master_luarocks_runner.sh
b/ci/linux_apisix_master_luarocks_runner.sh
index 337b4c4..a75fdf6 100755
--- a/ci/linux_apisix_master_luarocks_runner.sh
+++ b/ci/linux_apisix_master_luarocks_runner.sh
@@ -36,24 +36,6 @@ script() {
mkdir tmp && cd tmp
cp -r ../utils ./
- # install APISIX by shell
- sudo mkdir -p /usr/local/apisix/deps
- sudo PATH=$PATH ./utils/install-apisix.sh install > build.log 2>&1 || (cat
build.log && exit 1)
- cp ../bin/apisix /usr/bin/apisix
- tree /usr/local/apisix/
-
- which apisix
-
- # run test
- sudo PATH=$PATH apisix help
- sudo PATH=$PATH apisix init
- sudo PATH=$PATH apisix start
- sudo PATH=$PATH apisix quit
- sudo PATH=$PATH apisix start
- sudo PATH=$PATH apisix stop
-
- sudo PATH=$PATH ./utils/install-apisix.sh remove > build.log 2>&1 || (cat
build.log && exit 1)
-
# install APISIX by luarocks
sudo luarocks install $APISIX_MAIN > build.log 2>&1 || (cat build.log &&
exit 1)
cp ../bin/apisix /usr/local/bin/apisix
diff --git a/utils/install-apisix.sh b/utils/install-apisix.sh
deleted file mode 100755
index 92a3dd6..0000000
--- a/utils/install-apisix.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-set -ex
-
-OR_EXEC=`which openresty 2>&1`
-echo $OR_EXEC
-APISIX_VER="https://raw.githubusercontent.com/apache/apisix/master/rockspec/apisix-master-0.rockspec"
-
-# check the openresty exist
-CHECK_OR_EXIST=`echo $OR_EXEC | grep ": no openresty" | wc -l`
-if [ $CHECK_OR_EXIST -eq 1 ];then
- echo "can not find the openresty, install failed"
- exit 1;
-fi
-
-LUA_JIT_DIR=`$OR_EXEC -V 2>&1 | grep prefix | grep -Eo 'prefix=(.*?)/nginx' |
grep -Eo '/.*/'`
-LUA_JIT_DIR="${LUA_JIT_DIR}luajit"
-echo $LUA_JIT_DIR
-
-LUAROCKS_VER=`luarocks --version | grep -E -o "luarocks [0-9]+."`
-echo $LUAROCKS_VER
-
-UNAME=`uname`
-echo $UNAME
-
-
-do_install() {
- if [ "$LUAROCKS_VER" = 'luarocks 3.' ]; then
- sudo luarocks install --lua-dir=$LUA_JIT_DIR $APISIX_VER
--tree=/usr/local/apisix/deps --local
-
- else
- sudo luarocks install $APISIX_VER --tree=/usr/local/apisix/deps --local
- fi
-
- sudo rm -f /usr/bin/apisix
- sudo ln -s /usr/local/apisix/deps/bin/apisix /usr/bin/apisix
-}
-
-
-do_remove() {
- sudo rm -f /usr/bin/apisix
- sudo luarocks purge --tree /usr/local/apisix/deps
-}
-
-
-case_opt=$1
-if [ ! $case_opt ]; then
- case_opt='install'
-fi
-echo $case_opt
-
-case ${case_opt} in
-install)
- do_install "$@"
- ;;
-remove)
- do_remove "$@"
- ;;
-esac