Skip to content

Commit

Permalink
remove index yaml to root (#175)
Browse files Browse the repository at this point in the history
Signed-off-by: yandongxiao <[email protected]>
  • Loading branch information
yandongxiao authored Jul 13, 2023
1 parent 6f983b4 commit 2b05d31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions helm-charts/charts/index.yaml → index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ entries:
kube-starrocks:
- apiVersion: v2
appVersion: 3.0-latest
created: "2023-07-13T10:46:48.158337+08:00"
created: "2023-07-13T17:09:37.23417+08:00"
description: kube-starrocks collects Kubernetes manifests, starrocks combined
with documentation and scripts to provide easy to operate end-to-end Kubernetes
cluster deploy starrocks using the starrocks operator.
digest: 9172dcad1bd4998324ed09fa7e29e5a962222d6b99be053b441b4a44e6fd6d63
digest: 07bcf483c3766b462aa23a08c078763d2eab70f4d47faa6455739ef10bed671b
home: https://github.com/StarRocks/starrocks-kubernetes-operator
icon: https://avatars.githubusercontent.com/u/88238841
keywords:
Expand Down Expand Up @@ -60,4 +60,4 @@ entries:
urls:
- https://github.com/StarRocks/helm-charts/releases/download/kube-starrocks-1.6.1/kube-starrocks-1.6.1.tgz
version: 1.6.1
generated: "2023-07-13T10:46:48.157378+08:00"
generated: "2023-07-13T17:09:37.232507+08:00"
15 changes: 8 additions & 7 deletions scripts/artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,20 @@ fi

# helm repo index
url=https://github.com/StarRocks/starrocks-kubernetes-operator/releases/download/${release_tag}/${chart_name}-chart-${chart_version}.tgz
if [ -f $HOME_PATH/helm-charts/charts/index.yaml ]; then
helm repo index --merge $HOME_PATH/helm-charts/charts/index.yaml --url $url ..
if [ -f $HOME_PATH/index.yaml ]; then
helm repo index --merge $HOME_PATH/index.yaml --url $url $HOME_PATH
else
helm repo index --url $url ..
helm repo index --url $url $HOME_PATH
fi

# the generated index.yaml is not correct, so we need to fix it
# the wrong one, e.g. https://github.com/StarRocks/starrocks-kubernetes-operator/releases/download/v1.7.0/kube-starrocks-chart-1.7.0.tgz/kube-starrocks/kube-starrocks-1.7.0.tgz
# the wrong one, e.g. https://github.com/StarRocks/starrocks-kubernetes-operator/releases/download/v1.7.0/kube-starrocks-chart-1.7.0.tgz/artifacts/kube-starrocks-1.7.0.tgz
# first get the url in index.yaml
old=$(cat $HOME_PATH/helm-charts/charts/index.yaml | grep "$url")
old=$(cat $HOME_PATH/index.yaml | grep "$url")
new=${old%/*/*}
# then replace the url with the correct one, and do not use sed
sed "s|$old|$new|g" $HOME_PATH/helm-charts/charts/index.yaml >/tmp/index.yaml
cp /tmp/index.yaml $HOME_PATH/helm-charts/charts/index.yaml
sed "s|$old|$new|g" $HOME_PATH/index.yaml >/tmp/index.yaml
cp /tmp/index.yaml $HOME_PATH/index.yaml

# copy to artifacts
mkdir -p $HOME_PATH/artifacts
Expand Down

0 comments on commit 2b05d31

Please sign in to comment.