Skip to content

Commit b83bd4e

Browse files
perdasilvaPer Goncalves da Silva
and
Per Goncalves da Silva
authored
remove 'function' from function defs in bash scripts (#1559)
Signed-off-by: Per Goncalves da Silva <[email protected]> Co-authored-by: Per Goncalves da Silva <[email protected]>
1 parent 6809614 commit b83bd4e

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

hack/tools/catalogs/generate-manifests

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ assert-container-runtime
1717
# Check required tools are installed
1818
assert-commands jq
1919

20-
function usage() {
20+
usage() {
2121
print-banner
2222
echo ""
2323
echo "Usage:"

hack/tools/catalogs/list-compatible-bundles

+6-6
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ done
4545
shift $((OPTIND -1))
4646

4747
# Select bundle documents
48-
function select-bundle-documents() {
48+
select-bundle-documents() {
4949
jq 'select(.schema == "olm.bundle")'
5050
}
5151

5252
# Select bundles that declare AllNamespace install mode
5353
# or declare nothing at all (older released bundles sans "olm.csv.metadata" property)
54-
function that-support-allnamespace-install-mode() {
54+
that-support-allnamespace-install-mode() {
5555
jq 'select(
5656
all(.properties[].type; . != "olm.csv.metadata") or
5757
(.properties[]? |
@@ -65,23 +65,23 @@ function that-support-allnamespace-install-mode() {
6565
}
6666

6767
# Select bundles without dependencies
68-
function that-dont-have-dependencies() {
68+
that-dont-have-dependencies() {
6969
jq 'select(all(.properties[].type; . != "olm.package.required" and . != "olm.gvk.required"))'
7070
}
7171

7272
# Select the "olm.package" property from the bundles
7373
# This contains the packageName and version information
74-
function extract-olm-package-property() {
74+
extract-olm-package-property() {
7575
jq '.properties[] | select(.type == "olm.package") |.value'
7676
}
7777

7878
# Group packages by name and collect versions into an array
79-
function group-versions-by-package-name() {
79+
group-versions-by-package-name() {
8080
jq -s 'group_by(.packageName) | map({packageName: .[0].packageName, versions: map(.version)})'
8181
}
8282

8383
# Apply regex on name
84-
function filter-by-regex-if-necessary() {
84+
filter-by-regex-if-necessary() {
8585
jq --arg regex "$REGEX" '
8686
if $regex != "" then
8787
map(select(.packageName | test($regex)))

scripts/install.tpl.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@ if [[ -z "$catalogd_version" || -z "$cert_mgr_version" ]]; then
2525
exit 1
2626
fi
2727

28-
function kubectl_wait() {
28+
kubectl_wait() {
2929
namespace=$1
3030
runtime=$2
3131
timeout=$3
3232

3333
kubectl wait --for=condition=Available --namespace="${namespace}" "${runtime}" --timeout="${timeout}"
3434
}
3535

36-
function kubectl_wait_rollout() {
36+
kubectl_wait_rollout() {
3737
namespace=$1
3838
runtime=$2
3939
timeout=$3
4040

4141
kubectl rollout status --namespace="${namespace}" "${runtime}" --timeout="${timeout}"
4242
}
4343

44-
function kubectl_wait_for_query() {
44+
kubectl_wait_for_query() {
4545
manifest=$1
4646
query=$2
4747
timeout=$3

0 commit comments

Comments
 (0)