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 b8faf0b4b fix(make): make reload doesn't call apisix reload (#7383)
b8faf0b4b is described below

commit b8faf0b4b97ceab608243233b371d1044702d687
Author: 罗泽轩 <[email protected]>
AuthorDate: Tue Jul 5 11:06:55 2022 +0800

    fix(make): make reload doesn't call apisix reload (#7383)
    
    Signed-off-by: spacewander <[email protected]>
---
 Makefile               |  2 +-
 t/cli/test_makefile.sh | 40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 6c82a6a94..5a575d340 100644
--- a/Makefile
+++ b/Makefile
@@ -243,7 +243,7 @@ clean:
 .PHONY: reload
 reload: runtime
        @$(call func_echo_status, "$@ -> [ Start ]")
-       $(ENV_NGINX) -s reload
+       $(ENV_APISIX) reload
        @$(call func_echo_success_status, "$@ -> [ Done ]")
 
 
diff --git a/t/cli/test_makefile.sh b/t/cli/test_makefile.sh
new file mode 100755
index 000000000..5b1ecd712
--- /dev/null
+++ b/t/cli/test_makefile.sh
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+
+#
+# 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.
+#
+
+. ./t/cli/common.sh
+
+make run
+
+echo "
+apisix:
+  enable_admin: true
+  admin_listen:
+    ip: 127.0.0.2
+    port: 9181
+" > conf/config.yaml
+
+make reload
+make stop
+
+if ! grep "listen 127.0.0.2:9181;" conf/nginx.conf > /dev/null; then
+    echo "failed: regenerate nginx conf in 'make reload'"
+    exit 1
+fi
+
+echo "passed: regenerate nginx conf in 'make reload'"

Reply via email to