Update release script to branch off main for minor releases (#20956)

This commit is contained in:
Luke Heath 2024-08-01 12:18:59 -07:00 committed by GitHub
parent 8fb64cdd00
commit 3df700b1e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -628,6 +628,8 @@ start_ver_tag=fleet-$start_version
if [[ "$minor" == "true" ]]; then
echo "Minor release from $start_version to $next_ver"
# For scheduled minor releases, we want to branch off of main
start_ver_tag="main"
else
echo "Patch release from $start_version to $next_ver"
fi
@ -699,7 +701,7 @@ if [ "$cherry_pick_resolved" = "false" ]; then
git checkout $start_ver_tag
git pull origin $start_ver_tag
else
echo "DRYRUN: Would have checked out starting tag $start_ver_tag"
echo "DRYRUN: Would have checked out starting at $start_ver_tag"
fi
local_exists=$(git branch | $GREP_CMD $target_branch)
@ -730,7 +732,7 @@ if [ "$cherry_pick_resolved" = "false" ]; then
prs_for_issue=$(gh api repos/fleetdm/fleet/issues/$issue/timeline --paginate | jq -r '.[]' | $GREP_CMD "fleetdm/fleet/" | $GREP_CMD -oP "pulls\/\K(?:\d+)")
echo -n "https://github.com/fleetdm/fleet/issues/$issue"
if [[ "$prs_for_issue" == "" ]]; then
echo -n " NO PR's found, please verify they are not missing in the issue, if no PR's were required for this ticket please reconsider adding it to this release."
echo -n " - No PRs found, please verify they are not missing in the issue."
fi
for val in $prs_for_issue; do
echo -n " $val"