Skip to content

Commit

Permalink
instructions to release sidecar
Browse files Browse the repository at this point in the history
Signed-off-by: pjuarezd <[email protected]>
  • Loading branch information
pjuarezd committed Jul 16, 2024
1 parent 20841dc commit d942e17
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ helm-reindex:
@./helm-reindex.sh

update-versions:
@./release.sh
@./release.sh --release-sidecar=$(RELEASE_SIDECAR)

release: update-versions generate-code regen-crd regen-crd-docs
@git add .
Expand Down
20 changes: 19 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

set -e

# Parse command line arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
--release-sidecar)
RELEASE_SIDECAR="$2"
shift 2
;;
*)
;;
esac
shift
done

get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
Expand Down Expand Up @@ -36,7 +49,7 @@ files=(
"testing/console-tenant+kes.sh"
)

CURRENT_RELEASE=$(get_latest_release minio/operator)
CURRENT_RELEASE="v5.0.15"
CURRENT_RELEASE="${CURRENT_RELEASE:1}"

echo "MinIO: $MINIO_RELEASE"
Expand Down Expand Up @@ -68,6 +81,11 @@ done
# Update annotation in kustomization yaml
sed -i -e "s~operator.min.io/version: .*~operator.min.io/version: v${RELEASE}~g" "resources/kustomization.yaml"

if [ "${RELEASE_SIDECAR}" = "true" ]; then

sed -i -e 's~quay.io/minio/operator-sidecar:.*\"~quay.io/minio/operator-sidecar:v'$RELEASE'\"~g' "pkg/resources/statefulsets/minio-sidecar.go"
fi

# Add all the generated files to git

echo "clean -e files"
Expand Down

0 comments on commit d942e17

Please sign in to comment.