Skip to content

Commit

Permalink
chore: exit if any error and specify the download file name when down…
Browse files Browse the repository at this point in the history
…load by `wget`. (#751)

fix #646
  • Loading branch information
membphis authored Nov 9, 2020
1 parent 8c40e0f commit 033942d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ manager-api

output
default.etcd
api/build-tools/apisix
/*.zip
9 changes: 6 additions & 3 deletions api/build-tools/schema-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,24 @@
# 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/
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"

0 comments on commit 033942d

Please sign in to comment.