You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2020/11/01 06:54:33 UTC

[apisix] branch master updated: bug(CLI): CI failed, failed to load `apisix.cli.ngx_tpl` (#2588)

This is an automated email from the ASF dual-hosted git repository.

juzhiyuan 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 edb8c7c  bug(CLI): CI failed, failed to load `apisix.cli.ngx_tpl` (#2588)
edb8c7c is described below

commit edb8c7c5901aba1e824383fc5668d9b03337f1ce
Author: YuanSheng Wang <me...@gmail.com>
AuthorDate: Sun Nov 1 14:54:24 2020 +0800

    bug(CLI): CI failed, failed to load `apisix.cli.ngx_tpl` (#2588)
    
    * for test.
    
    * CLI: load the Lua module after updated the `package.path`.
    
    * CI: used patch to make the CI run normal.
    
    * bugfix: add sudo
    
    * chore:  print the location of `apisix`.
    
    * reverted not related change.
---
 .travis/linux_apisix_master_luarocks_runner.sh | 8 ++++++++
 bin/apisix                                     | 3 +--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/.travis/linux_apisix_master_luarocks_runner.sh b/.travis/linux_apisix_master_luarocks_runner.sh
index 2236885..70dff0d 100755
--- a/.travis/linux_apisix_master_luarocks_runner.sh
+++ b/.travis/linux_apisix_master_luarocks_runner.sh
@@ -59,6 +59,11 @@ script() {
     sudo mkdir -p /usr/local/apisix/deps
     sudo PATH=$PATH ./utils/install-apisix.sh install > build.log 2>&1 || (cat build.log && exit 1)
 
+    which apisix
+    # TODO: DELETE ME AFTER https://github.com/apache/apisix/pull/2588 merged
+    sudo cp ../bin/apisix /usr/bin/apisix
+
+    # run test
     sudo PATH=$PATH apisix help
     sudo PATH=$PATH apisix init
     sudo PATH=$PATH apisix start
@@ -69,6 +74,9 @@ script() {
     # install APISIX by luarocks
     sudo luarocks install $APISIX_MAIN > build.log 2>&1 || (cat build.log && exit 1)
 
+    # TODO: DELETE ME AFTER https://github.com/apache/apisix/pull/2588 merged
+    sudo cp ../bin/apisix /usr/bin/apisix
+
     # show install files
     luarocks show apisix
 
diff --git a/bin/apisix b/bin/apisix
index 015bab7..f714ed4 100755
--- a/bin/apisix
+++ b/bin/apisix
@@ -17,8 +17,6 @@
 -- limitations under the License.
 --
 
-local ngx_tpl = require "apisix.cli.ngx_tpl"
-
 local function trim(s)
     return (s:gsub("^%s*(.-)%s*$", "%1"))
 end
@@ -82,6 +80,7 @@ do
     end
 end
 
+local ngx_tpl = require("apisix.cli.ngx_tpl")
 local yaml = require("tinyyaml")
 local template = require("resty.template")