Skip to content

Commit

Permalink
fix: when change the cdn is 0 is fail
Browse files Browse the repository at this point in the history
  • Loading branch information
yrluke authored Jan 5, 2024
1 parent 1ef873d commit 81edced
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions release/latest/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ grep "POSTGRES_PASSWORD" ".env" >/dev/null || echo "POSTGRES_PASSWORD=$(LC_ALL=C
grep "SUBNET_PREFIX" ".env" >/dev/null || echo "SUBNET_PREFIX=172.22.222" >>".env"


if [ $CDN -eq 0 ]; then
sed -i "s/IMAGE_PREFIX=.*/IMAGE_PREFIX=chaitin/g" ".env"
else
sed -i "s/IMAGE_PREFIX=.*/IMAGE_PREFIX=swr.cn-east-3.myhuaweicloud.com\/chaitin-safeline/g" ".env"
fi

if [ $CDN -eq 0 ]; then
grep "IMAGE_PREFIX" ".env" >/dev/null || echo "IMAGE_PREFIX=chaitin" >>".env"
else
Expand Down

0 comments on commit 81edced

Please sign in to comment.