-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build-all-in-one.sh
executable file
·22 lines (20 loc) · 1.13 KB
/
build-all-in-one.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
rm -rf install/all-in-one
mkdir install/all-in-one
cat ./deploy/crds/microcks_v1alpha1_microcksinstall_crd.yaml > install/all-in-one/operator-latest.yaml
echo '---' >> install//all-in-one/operator-latest.yaml
cat ./deploy/service_account.yaml >> install/all-in-one/operator-latest.yaml
echo '---' >> install/all-in-one/operator-latest.yaml
cat ./deploy/role.yaml >> install/all-in-one/operator-latest.yaml
echo '---' >> install/all-in-one/operator-latest.yaml
cat ./deploy/role_binding.yaml >> install/all-in-one/operator-latest.yaml
echo '---' >> install/all-in-one/operator-latest.yaml
cat ./deploy/operator_latest.yaml >> install/all-in-one/operator-latest.yaml
if [ -n "$1" ]; then
if [ "$(uname)" == "Darwin" ]; then
sed -i '' 's=microcks-ansible-operator:latest=microcks-ansible-operator:'"$1"'=g' install/all-in-one/operator-latest.yaml
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
sed -i 's=microcks-ansible-operator:latest=microcks-ansible-operator:'"$1"'=g' install/all-in-one/operator-latest.yaml
fi
mv install/all-in-one/operator-latest.yaml install/all-in-one/operator-$1.yaml
fi