Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #152 from kyleschlosser/release_scripts
Browse files Browse the repository at this point in the history
Update the prepare release scripts
  • Loading branch information
kyleschlosser authored Sep 4, 2019
2 parents 87856b4 + a32c23b commit 3813206
Showing 1 changed file with 5 additions and 30 deletions.
35 changes: 5 additions & 30 deletions .travis/prepare_release.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,9 @@
#!/bin/bash
BASEPATH=$(dirname $(dirname $0))
DEST=$BASEPATH/deploy/kabanero-operators.yaml

# Find we are running on MAC.
MAC_EXEC=false
macos=Darwin
if [ "$(uname)" == "Darwin" ]; then
MAC_EXEC=true
fi
# Split the IMAGE variable into repository and tag parts
# e.g. kabanero/kabanero-operator:0.1.1 -> kabanero/kabanero-operator
IFS=’:’ read -ra REPOSITORY <<< "$IMAGE"

# Prepare operator deployment file
cat << EOF >> $DEST
apiVersion: v1
kind: Namespace
metadata:
name: kabanero
---
EOF

cat $BASEPATH/deploy/dependencies.yaml >> $DEST; echo "---" >> $DEST
cat $BASEPATH/deploy/operator.yaml >> $DEST; echo "---" >> $DEST
cat $BASEPATH/deploy/role.yaml >> $DEST; echo "---" >> $DEST
cat $BASEPATH/deploy/role_binding.yaml >> $DEST; echo "---" >> $DEST
cat $BASEPATH/deploy/service_account.yaml >> $DEST; echo "---" >> $DEST

# Update the operator deployment image entry if TRAVIS_TAG is set
if [ ! -z "$TRAVIS_TAG" ]; then
if [[ $MAC_EXEC == true ]]; then
sed -i '' -e "s!image: kabanero-operator:latest!image: kabanero-operator:$TRAVIS_TAG!g" $DEST
else
sed -i "s!image: kabanero-operator:latest!image: kabanero-operator:$TRAVIS_TAG!g" $DEST
fi
fi
# Levearge the gen_operator_deployment.sh script to generate deploy/kabanero-operators.yaml
$BASEPATH/contrib/gen_operator_deployment.sh $REPOSITORY:$TRAVIS_TAG

0 comments on commit 3813206

Please sign in to comment.