Skip to content

Commit

Permalink
update release.sh
Browse files Browse the repository at this point in the history
Signed-off-by: oilbeater <liumengxinfly@gmail.com>
  • Loading branch information
oilbeater committed Feb 26, 2024
1 parent b5f7a63 commit 29157d4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,31 @@ fi

echo "tag and push image"
VERSION=$(cat VERSION)
set +e
docker manifest rm kubeovn/kube-ovn:${VERSION}
docker manifest rm kubeovn/vpc-nat-gateway:${VERSION}
set -e

docker pull kubeovn/kube-ovn:${VERSION}-x86
docker pull kubeovn/kube-ovn:${VERSION}-arm
docker pull kubeovn/vpc-nat-gateway:${VERSION}-x86
docker pull kubeovn/vpc-nat-gateway:${VERSION}-arm
docker pull kubeovn/kube-ovn:${VERSION}-debug-x86
docker pull kubeovn/kube-ovn:${VERSION}-debug-arm

docker manifest create kubeovn/kube-ovn:${VERSION} kubeovn/kube-ovn:${VERSION}-x86 kubeovn/kube-ovn:${VERSION}-arm
docker manifest create kubeovn/vpc-nat-gateway:${VERSION} kubeovn/vpc-nat-gateway:${VERSION}-x86 kubeovn/vpc-nat-gateway:${VERSION}-arm
docker manifest create kubeovn/kube-ovn:${VERSION}-debug kubeovn/kube-ovn:${VERSION}-debug-x86 kubeovn/kube-ovn:${VERSION}-debug-arm

docker manifest push kubeovn/kube-ovn:${VERSION}
docker manifest push kubeovn/vpc-nat-gateway:${VERSION}
docker manifest push kubeovn/kube-ovn:${VERSION}-debug

echo "modify tag in install.sh and values.yaml"
sed -i '/^VERSION=/c\VERSION="'"${VERSION}"'"' dist/images/install.sh
sed -i 's/tag:\ .*/tag:\ '"${VERSION}"'/' charts/kube-ovn/values.yaml
sed -i 's/version:\ .*/version:\ '"${VERSION}"'/' charts/kube-ovn/Chart.yaml
sed -i 's/appVersion:\ .*/appVersion:\ "'"${VERSION#v}"'"/' charts/kube-ovn/Chart.yaml

echo "commit, tag and push"
git add dist/images/install.sh
Expand All @@ -50,7 +57,7 @@ git commit -m "prepare for next release"
git push

echo "draft a release"
gh release create $VERSION --draft
gh release create $VERSION --draft --generate-notes

echo "trigger action to build new base"
gh workflow run build-kube-ovn-base.yaml --ref $(git branch --show-current)
Expand Down

0 comments on commit 29157d4

Please sign in to comment.