Ocelot-Social/scripts/release.sh
Ulf Gebhardt 54c2e5c131
release: also update helmchart versions (#8256)
To have congruence a release also updates the helmchart version. This
utilizes sed to replace the coresponding string. The `sed` command is
not present on windows and could prevent a windows user to use the
release functionality out of the box.

The release functionality is also externalized into its own script
`scripts/release.sh`.
2025-03-17 21:49:26 +01:00

29 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
# base setup
SCRIPT_PATH=$(realpath $0)
SCRIPT_DIR=$(dirname $SCRIPT_PATH)
ROOT_DIR=$SCRIPT_DIR/..
# Update Version
cd $ROOT_DIR
yarn version --no-git-tag-version --no-commit-hooks --no-commit
VERSION_NEW=$(node -p -e "require('$ROOT_DIR/package.json').version")
## packages
cd backend
yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $VERSION_NEW
cd $ROOT_DIR/frontend
yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $VERSION_NEW
cd $ROOT_DIR/webapp
yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $VERSION_NEW
cd $ROOT_DIR/webapp/maintenance/source
yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $VERSION_NEW
## helm
sed -i -e 's/appVersion: ".*"/appVersion: "'"$VERSION_NEW"'"/g' $ROOT_DIR/deployment/helm/charts/ocelot-neo4j/Chart.yaml
sed -i -e 's/appVersion: ".*"/appVersion: "'"$VERSION_NEW"'"/g' $ROOT_DIR/deployment/helm/charts/ocelot-social/Chart.yaml
# generate changelog
cd $ROOT_DIR
yarn run auto-changelog --latest-version $VERSION_NEW