mirror of
https://github.com/alibaba/higress.git
synced 2026-05-11 06:17:26 +08:00
feat: add lint/e2e tests support (#126)
Signed-off-by: bitliu <bitliu@tencent.com>
This commit is contained in:
46
tools/hack/prebuild.sh
Executable file
46
tools/hack/prebuild.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
ENVOY_VERSION="${ENVOY_VERSION:=1.20}"
|
||||
ISITO_VERSION="${ISTIO_VERSION:=1.12}"
|
||||
WORK_DIR=`cd $(dirname "$0")/../..;pwd`
|
||||
|
||||
cd $WORK_DIR
|
||||
|
||||
mkdir -p external/package
|
||||
|
||||
envoy_repos=("go-control-plane" "envoy")
|
||||
|
||||
for repo in ${envoy_repos[@]}; do
|
||||
if [ -e external/$repo ];then
|
||||
continue
|
||||
fi
|
||||
cp -r envoy/${ENVOY_VERSION}/$repo external/$repo
|
||||
for patch in `ls envoy/${ENVOY_VERSION}/patches/$repo/*.patch`; do
|
||||
patch -d external/$repo -p1 < $patch
|
||||
done
|
||||
cd external/$repo
|
||||
echo "gitdir: /parent/.git/modules/envoy/${ENVOY_VERSION}/$repo" > .git
|
||||
if [ -f "go.mod" ]; then
|
||||
go mod tidy
|
||||
fi
|
||||
cd $WORK_DIR
|
||||
done
|
||||
|
||||
istio_repos=("api" "client-go" "pkg" "istio" "proxy")
|
||||
|
||||
for repo in ${istio_repos[@]}; do
|
||||
if [ -e external/$repo ];then
|
||||
continue
|
||||
fi
|
||||
cp -r istio/${ISTIO_VERSION}/$repo external/$repo
|
||||
for patch in `ls istio/${ISTIO_VERSION}/patches/$repo/*.patch`; do
|
||||
patch -d external/$repo -p1 < $patch
|
||||
done
|
||||
cd external/$repo
|
||||
echo "gitdir: /parent/.git/modules/istio/${ISTIO_VERSION}/$repo" > .git
|
||||
if [ -f "go.mod" ]; then
|
||||
go mod tidy
|
||||
fi
|
||||
cd $WORK_DIR
|
||||
done
|
||||
Reference in New Issue
Block a user