Skip to content

Conversation

@NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Dec 23, 2025

In an attempt to prepare the release, I noticed that there are a lot of manual steps.

I don't like manual steps, so I made a script to test out.

This script is is how I interpreted the instructions in RELEASE.md

#!/usr/bin/env bash
#
# This script automates portions of the RELEASE.md so we don't have to parse out either verbose or ambiguous lanugage
# (no fault against any writer of a RELEASE.md, but there is a lot of things to make sure are correct, and codifying it is good to do)
#
# Script requires:
# - Built-ins
#   - uuid
#   - mktemp
#   - sed
# - Need installed
#   - jq
#   - git
#


main="origin/main"
branch_name="merge-release"
target="origin/beta"
upstream="origin/release"

function run() {
  git fetch

  if [ `git rev-parse --verify $branch_name 2>/dev/null` ]
  then
    # a uuid is used so we can repeatedly run this script locally without dealing with conflict / branch collision UI
    local id=$(uuid)
    echo "Branch, $branch_name, already exists, using different branch name: $branch_name-$id"
    branch_name="$branch_name-$id"
  fi

  echo "Creating new branch: $branch_name from $target"
  git checkout --no-track -b $branch_name $target

  echo "Updating from $upstream"
  git merge $upstream --no-ff

  echo "Reverting changes for workflows, release files, etc"
  git checkout $target -- .release-plan.json
  git checkout $target -- .github/

  echo "Reverting the 'version' and 'release-plan' change from $upstream as we are on the $target train, and we want to keep the values on $target"
  local version_at_target=$(git show $target:package.json | jq '.version' -r)
  local release_config_at_target=$(git show $target:package.json | jq '."release-plan"' -r)
  local fixed_package_json_contents=$(jq ".version = \"$version_at_target\" | .\"release-plan\" = $release_config_at_target" package.json)

  echo -E "${fixed_package_json_contents}" > package.json

  if [[ "$target" == "origin/beta" ]]; then
    echo "Because we're updating beta, we also want to pull in any changes from $main as well"

    git merge $main --no-ff

    echo "Reverting changes for workflows, release files, etc"
    git checkout $target -- .release-plan.json
    git checkout $target -- .github/

    echo "Updating the version for the new beta"
    # Takes the version from main, and swaps the alpha suffix with a beta suffix
    local new_beta_version=$(git show $main:package.json | jq '.version' -r | sed 's/-alpha.*/-beta.0/')
    local post_main_fixed_package_json_contents=$(jq ".version = \"$new_beta_version\" | .\"release-plan\" = $release_config_at_target" package.json)

    echo -E "${post_main_fixed_package_json_contents}" > package.json

    echo "Updating blueprint dependencies"

    pnpm dlx update-blueprint-deps --ember-source beta
    pnpm dlx update-blueprint-deps --ember-cli beta

    git commit -am"update blueprint dependencies to beta"

    git push origin $branch_name

    # We can automate more with the GH CLI
    echo ""
    echo "Steps remaining:"
    echo "- Open PR targeting beta with a PR title like 'Prepare $new_beta_version'"
    echo "- Mark the PR as an 'enhancement'"
    # up until here anyway -- the following must all be human
    echo "- Make sure CI passes"
    echo "- Merge $branch_name into $target (using the GitHub UI)"
    echo "- Check that release-plan's 'Prepare Beta Release' PR has been correctly opened"
    echo "- Merge the 'Prepare Beta Release' PR"
    echo "- Check the 'Release Beta' GitHub action to make sure release succeeds"
  fi
}

echo ""
run
echo ""

@NullVoxPopuli NullVoxPopuli added the enhancement New feature or request label Dec 23, 2025
@@ -1,6 +1,6 @@
{
"name": "@ember/app-blueprint",
"version": "6.9.0-beta.2",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks correct

"ember-qunit": "^9.0.4",
"ember-resolver": "^13.1.1",
"ember-source": "~6.9.0-beta.1",
"ember-source": "~6.9.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm dlx update-blueprint-deps --ember-source beta doesn't work

@mansona mansona closed this Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants