Skip to content

Commit

Permalink
Merge pull request #13012 from justinsb/nodeup_script_explicit_return
Browse files Browse the repository at this point in the history
nodeup bash script: use explicit return code
  • Loading branch information
k8s-ci-robot committed Dec 20, 2021
2 parents 47c7f21 + e8ddfa4 commit cc26c87
Show file tree
Hide file tree
Showing 148 changed files with 352 additions and 352 deletions.
4 changes: 2 additions & 2 deletions pkg/model/resources/nodeup.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi
Expand All @@ -93,7 +93,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
4 changes: 2 additions & 2 deletions pkg/model/tests/data/bootstrapscript_0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -79,7 +79,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
4 changes: 2 additions & 2 deletions pkg/model/tests/data/bootstrapscript_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -79,7 +79,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
4 changes: 2 additions & 2 deletions pkg/model/tests/data/bootstrapscript_2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -79,7 +79,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
4 changes: 2 additions & 2 deletions pkg/model/tests/data/bootstrapscript_3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -79,7 +79,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
4 changes: 2 additions & 2 deletions pkg/model/tests/data/bootstrapscript_4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -79,7 +79,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
4 changes: 2 additions & 2 deletions pkg/model/tests/data/bootstrapscript_5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -79,7 +79,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Resources.AWSEC2LaunchTemplateapiserverapiserversminimalexamplecom.Properties.La
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi
Expand All @@ -64,7 +64,7 @@ Resources.AWSEC2LaunchTemplateapiserverapiserversminimalexamplecom.Properties.La
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down Expand Up @@ -215,7 +215,7 @@ Resources.AWSEC2LaunchTemplatemasterustest1amastersminimalexamplecom.Properties.
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi
Expand All @@ -238,7 +238,7 @@ Resources.AWSEC2LaunchTemplatemasterustest1amastersminimalexamplecom.Properties.
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down Expand Up @@ -475,7 +475,7 @@ Resources.AWSEC2LaunchTemplatenodesminimalexamplecom.Properties.LaunchTemplateDa
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi
Expand All @@ -498,7 +498,7 @@ Resources.AWSEC2LaunchTemplatenodesminimalexamplecom.Properties.LaunchTemplateDa
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -63,7 +63,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -63,7 +63,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -63,7 +63,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -63,7 +63,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -63,7 +63,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -63,7 +63,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -72,7 +72,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Resources.AWSEC2LaunchTemplatemasterustest1amasterscomplexexamplecom.Properties.
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi
Expand All @@ -73,7 +73,7 @@ Resources.AWSEC2LaunchTemplatemasterustest1amasterscomplexexamplecom.Properties.
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down Expand Up @@ -325,7 +325,7 @@ Resources.AWSEC2LaunchTemplatenodescomplexexamplecom.Properties.LaunchTemplateDa
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi
Expand All @@ -348,7 +348,7 @@ Resources.AWSEC2LaunchTemplatenodescomplexexamplecom.Properties.LaunchTemplateDa
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -72,7 +72,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -72,7 +72,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ download-or-bust() {
if ! validate-hash "${file}" "${hash}"; then
rm -f "${file}"
else
return
return 0
fi
fi

Expand All @@ -72,7 +72,7 @@ download-or-bust() {
rm -f "${file}"
else
echo "== Downloaded ${url} (SHA256 = ${hash}) =="
return
return 0
fi
done
done
Expand Down
Loading

0 comments on commit cc26c87

Please sign in to comment.