Draft: Automate the update of versions.json
What does this MR do and why?
This is a second attempt for !3706 (merged). We had to revert because of !3805 (merged).
Automate the update of the dropdown version. Basically step 4 of https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/releases.md#create-release-merge-request.
There's one thing missing: it doesn't check for the last major versions, so you need to check and change it manually. We need to figure out how to not include a version in major_versions
if it's already in one of the other hashes. However, we might not need to implement this at all because of gitlab-docs-archives#20 (closed)!
Related issues
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md.
-
Check out this branch.
-
Run the make target to update
versions.json
, you should see no change:make update-versions-dropdown
-
Edit
content/versions.json
and change the values ofnext
,current
, andlast_minor
. They can be any string. -
Run the make target again, it should change back to what it was:
make update-versions-dropdown
-
Optional. You can also try with the dry run mode:
DRY_RUN=true make update-versions-dropdown