Skip to content

Automate the update of versions.json

Achilleas Pipinellis requested to merge axil-automate-dropdown-version-bump into main

What does this MR do and why?

This is based on !3694 (merged). Will need to rebase after it's 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

#1586 (closed)

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md.

  2. Check out this branch.

  3. Run the make target to update versions.json, you should see no change:

    make update-versions-dropdown
  4. Edit content/versions.json and change the values of next, current, and last_minor. They can be any string.

  5. Run the make target again, it should change back to what it was:

    make update-versions-dropdown
  6. Optional. You can also try with the dry run mode:

    DRY_RUN=true make update-versions-dropdown
Edited by Achilleas Pipinellis

Merge request reports