Files
firezone/scripts/create-publish-pr.sh
Thomas Eizinger bc854e1f9a ci: automatically create PR after publishing release (#9556)
To make releases even more smoother, this PR creates a bit of automation
that automatically bumps the versions in the `scripts/bump-versions.sh`
script and opens a PR for it.
2025-06-18 06:17:18 +00:00

29 lines
679 B
Bash
Executable File

#!/usr/bin/env bash
set -xeuo pipefail
component="$1"
version="$2"
path_to_self=$(readlink -f "$0")
scripts_dir=$(dirname "$path_to_self")
path_to_bump_versions="$scripts_dir/bump-versions.sh"
# Create branch
git checkout -b "chore/publish-$component-$version"
# Update version variables in script
"$path_to_bump_versions" update_version_variables "$component" "$version"
# Bump versions across the codebase
"$path_to_bump_versions"
git add -A
git commit -m "chore: bump versions for $component to $version"
# Create PR
git push -u origin HEAD --force
gh pr create \
--title "chore: publish $component $version" \
--body "" \
--reviewer @firezone/engineering