mirror of
https://github.com/coreos/prometheus-operator.git
synced 2026-02-05 15:46:31 +01:00
19 lines
521 B
Bash
Executable File
19 lines
521 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# exit immediately when a command fails
|
|
set -e
|
|
# only exit with zero if all commands of the pipeline exit successfully
|
|
set -o pipefail
|
|
# error on unset variables
|
|
set -u
|
|
|
|
function concat() {
|
|
awk 'FNR==1{print "---"}1' "$@" | awk '{if (NR!=1) {print}}'
|
|
}
|
|
|
|
function generate_bundle() {
|
|
# shellcheck disable=SC2046
|
|
concat $(find "$@" -maxdepth 1 -name '*.yaml' | sort | grep -v service-monitor)
|
|
}
|
|
|
|
generate_bundle example/rbac/prometheus-operator example/prometheus-operator-crd > bundle.yaml
|