mirror of
https://github.com/alibaba/higress.git
synced 2026-02-21 22:40:59 +08:00
47 lines
1.1 KiB
Bash
Executable File
47 lines
1.1 KiB
Bash
Executable File
#!/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 -f 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 -f 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
|