Skip to content

Commit

Permalink
feat: add redirect for vNext (#5132)
Browse files Browse the repository at this point in the history
* feat: add a redirect for vNext

* docs: add a note so I don't forget to automate redirect URL modifications next release time
  • Loading branch information
pepopowitz authored Mar 4, 2025
1 parent 0c6f838 commit b735282
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 11 additions & 3 deletions howtos/release-procedure.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,31 @@ To create the new versions:
},
```

7. Create a PR containing only the first commit generated by the `./hacks/cutNewVersions.sh` script. This commit is very large, and will crash the browser of anyone trying to review it.
7. Manipulate version-wide redirects properly in `.htaccess`.

- vNext should include a redirect from its numbered counterpart to /next.
- The new vCurrent should include a redirect from its numbered counterpart to /.
- The previous vCurrent should no longer include a redirect.

This is a good candidate for future automation.

8. Create a PR containing only the first commit generated by the `./hacks/cutNewVersions.sh` script. This commit is very large, and will crash the browser of anyone trying to review it.

Tip: Use the [GitHub CLI](https://cli.github.com/) to create this PR, to avoid crashing your own browser. Example:

```sh
gh pr create --assignee @me --title "release(8.6): release version 8.6 (the big PR)"
```

8. Create a second PR, into the first PR, with the rest of the changes. This PR will be much easier for users to review in the GitHub UI.
9. Create a second PR, into the first PR, with the rest of the changes. This PR will be much easier for users to review in the GitHub UI.

Tip: Use the [GitHub CLI](https://cli.github.com/) to create this PR also. Specify the `--base` option to target the first PR. Example:

```sh
gh pr create --base "branch-name-of-the-first-PR" --assignee @me --title "release(8.6): release version 8.6 (the reviewable PR)"
```

9. With successful build and approval, merge the second PR into the first. Then merge the first into `main`.
10. With successful build and approval, merge the second PR into the first. Then merge the first into `main`.

### Release the new version

Expand Down
4 changes: 4 additions & 0 deletions static/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ RewriteRule ^(.*\.(yaml|bpmn|xml|png|jpeg|jpg|yml|pdf|svg|graphqls|diff))/$ /$1
# 2. Broad version (or unversioned) redirects
##################################################################################

# Numbered aliases for vNext. These are temporary, until this version becomes current.
RewriteRule ^docs/8.8/(.*)$ /docs/next/$1 [R=302,L]
RewriteRule ^optimize/3.16.0/(.*)$ /optimize/next/$1 [R=302,L]

# For linking from our apps - redirect URLs with the current version to URLs with no version
RewriteRule ^docs/8.6/(.*)$ /docs/$1 [R=302,L]
RewriteRule ^optimize/3.14.0/(.*)$ /optimize/$1 [R=302,L]
Expand Down

0 comments on commit b735282

Please sign in to comment.