Page MenuHomePhorge

release.sh
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

release.sh

#!/bin/bash
# Release script
# Run with "--rebuild" to not bump the version
# Run with "--rebuild --nobuild --nopublish" to locally rebuild chart and kolab-kubernetes-latest.tar.gz
set -e
# Version of the kolab-kubernetes release tarball
RELEASE_VERSION="latest"
export REGISTRY=${REGISTRY:-"quay.io/apheleiait/kolab"}
CURRENT_VERSION=$(cat ./version)
# Versions that we tag this release with
VERSION_CHANNEL="4.0"
if [[ "$1" == "--rebuild" ]]; then
shift
VERSION="$CURRENT_VERSION"
else
VERSION=$(echo "$CURRENT_VERSION" | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.)
echo "Found $CURRENT_VERSION, releasing $VERSION"
sed -i "s/$CURRENT_VERSION/$VERSION/g" helm/values.yaml
sed -i "s/$CURRENT_VERSION/$VERSION/g" docs/mkdocs.yml
sed -i "s/$CURRENT_VERSION/$VERSION/g" version
sed -i "s/$CURRENT_VERSION/$VERSION/g" kolabctl
fi
# Version of the helm chart itself
CHART_VERSION="$VERSION"
if [[ "$1" == "--nobuild" ]]; then
shift
echo "Not building the images"
else
podman login -u="$USERNAME" -p="$PASSWORD" quay.io
env REGISTRY="quay.io/apheleiait/kolab" build/build.sh --nochecks --release "$VERSION" "$VERSION_CHANNEL" "latest"
fi
helm registry login -u "$USERNAME" -p "$PASSWORD" quay.io/apheleiait
helm lint -f build/test.values.yaml ./helm/
shellcheck kolabctl
helm package --app-version "$VERSION" --version "$CHART_VERSION" helm/
git archive -o "kolab-kubernetes-$RELEASE_VERSION.tar.gz" master docs/ deployments/ examples/ kolabctl
if [[ "$1" == "--nopublish" ]]; then
shift
echo "Not publishing"
else
helm push "kolab-$CHART_VERSION.tgz" "oci://$REGISTRY"
fi

File Metadata

Mime Type
text/x-shellscript
Expires
Sat, Apr 4, 2:45 AM (4 d, 13 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a2/ec/571d8e741fbb85a15530730664fe
Default Alt Text
release.sh (1 KB)

Event Timeline