timescaledb/scripts/release/create_minor_release_branch.sh
Pallavi Sontakke c01ad1748e
Automate Minor release - Feature Freeze
with GitHub workflow files.

We run these steps for a new minor version - feature freeze :
- create the Bump-version PR on `main`, 
- create the new minor-version-branch , e.g. `2.18.x`
- create the Release PR on minor-version-branch

We no more use a fork, but a branch directly.
2025-02-03 11:35:14 +05:30

29 lines
643 B
Bash
Executable File

#!/bin/bash
set -eu
# Folder, where we have cloned repositories' sources
SOURCES_DIR="timescaledb"
FORK_DIR="timescaledb"
echo "---- Deriving the release related versions from main ----"
cd ~/"$SOURCES_DIR"/"$FORK_DIR"
git fetch --all
NEW_PATCH_VERSION="0"
NEW_VERSION=$(head -1 version.config | cut -d ' ' -f 3 | cut -d '-' -f 1)
RELEASE_BRANCH="${NEW_VERSION/%.$NEW_PATCH_VERSION/.x}"
echo "RELEASE_BRANCH is $RELEASE_BRANCH"
echo "NEW_VERSION is $NEW_VERSION"
echo "---- Creating the version branch from main ----"
git fetch --all
git checkout -b "$RELEASE_BRANCH" origin/main
git push origin "$RELEASE_BRANCH":"$RELEASE_BRANCH"