1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-16 01:06:27 +00:00
prometheus-operator/scripts/generate-bundle.sh
Damien Grisonnet fb9d660fa0 *: remove v1beta1 crds
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2020-05-04 09:33:40 +02:00

18 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