Skip to content

Commit ab34cca

Browse files
authored
Merge pull request #154 from DaoCloud/update-01
update sh
2 parents 8ce1968 + 21907e1 commit ab34cca

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

charts/hwameistor-operator/upgrade_hwameistor-operator.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ rm -rf hwameistor-operator
1919
oldVersion=$(ss=$(grep "VERSION" config) && echo ${ss#*=})
2020
echo "oldVersion: $oldVersion"
2121
OS=$(uname)
22-
if [ "$OS" == "Darwin" ];then
23-
sed -i '' "s/$oldVersion/$releaseVersion/g" config
24-
elif [ "$OS" == "Linux" ]
22+
if [ "$OS" == "Darwin" ]; then
23+
sed -i '' "s/$oldVersion/$releaseVersion/g" config
24+
elif [ "$OS" == "Linux" ]; then
2525
sed -i "s/$oldVersion/$releaseVersion/g" config
26-
then
27-
echo "Unsupported OS $OS" && exit 1
26+
else
27+
echo "Unsupported OS: $OS. Please use either 'Darwin' or 'Linux'." && exit 1
2828
fi
2929

3030
# download specified version chart
@@ -38,7 +38,7 @@ echo "Step2: do custom actions"
3838
oldValue1="hwameistorImageRegistry: ghcr.io"
3939
newValue1="hwameistorImageRegistry: ghcr.m.daocloud.io"
4040
oldValue2="k8sImageRegistry: registry.k8s.io"
41-
newValue2="k8sImageRegistry: m.daocloud.io/registry.k8s.io"
41+
newValue2="k8sImageRegistry: k8s.m.daocloud.io"
4242

4343
target_file="hwameistor-operator/values.yaml"
4444

0 commit comments

Comments
 (0)