You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by me...@apache.org on 2020/11/09 13:23:32 UTC
[apisix-dashboard] 01/01: chore: exit if any error and specify the
download file name when download by `wget`.
This is an automated email from the ASF dual-hosted git repository.
membphis pushed a commit to branch sync-schema
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
commit 42f693af472af898b5986425d2a5d7dcc03269cb
Author: Yuansheng <me...@gmail.com>
AuthorDate: Mon Nov 9 21:22:53 2020 +0800
chore: exit if any error and specify the download file name when download by `wget`.
---
.gitignore | 2 ++
api/build-tools/schema-sync.sh | 9 ++++++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/.gitignore b/.gitignore
index a3b8886..06ac7fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,3 +43,5 @@ manager-api
output
default.etcd
+api/build-tools/apisix
+/*.zip
diff --git a/api/build-tools/schema-sync.sh b/api/build-tools/schema-sync.sh
index 830e19c..7de361c 100755
--- a/api/build-tools/schema-sync.sh
+++ b/api/build-tools/schema-sync.sh
@@ -15,15 +15,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+
+set -ex
+
pwd=`pwd`
version="master"
if [[ -n $1 ]]; then
version=$1
-fi
+fi
rm -rf ./api/build-tools/apisix/
-wget https://github.com/apache/apisix/archive/$version.zip
+wget -O $version.zip https://github.com/apache/apisix/archive/$version.zip
unzip $version.zip
mkdir -p ./api/build-tools/apisix/
@@ -31,5 +34,5 @@ mv ./apisix-$version/apisix/* ./api/build-tools/apisix/
rm -rf ./apisix-$version
cd ./api/build-tools/ && lua schema-sync.lua > ${pwd}/api/conf/schema.json
-echo "sync success:"
+echo "sync success:"
echo "${pwd}/api/conf/schema.json"