Skip to content

Commit

Permalink
bug(CLI): CI failed, failed to load apisix.cli.ngx_tpl (#2588)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
membphis authored Nov 1, 2020
1 parent 952450b commit edb8c7c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .travis/linux_apisix_master_luarocks_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
3 changes: 1 addition & 2 deletions bin/apisix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -82,6 +80,7 @@ do
end
end

local ngx_tpl = require("apisix.cli.ngx_tpl")
local yaml = require("tinyyaml")
local template = require("resty.template")

Expand Down

0 comments on commit edb8c7c

Please sign in to comment.