Introduction
Periodically the documentation team must document a new product version. The process broadly follows these steps:
Create a branch for the previous version, leaving
masteras the branch for the new release.Update the
config/build_conf.yamlfile'sversion.releasekey to the new version.In the
docs-toolsrepository under thedata/directory, update the project's published branches configuration file.Update the redirects configuration file.
Publish all branches.
Tutorial
Consider a hypothetical project called bi-connector. This product
is currently on version 2.2, but documentation work must begin for
version 2.3.
As part of this release, the tutorial/connecting-to-atlas path has
been removed, and users should be redirected to reference/mongosqld.
Step 1: Branch
From the project's repository, create a new branch for the current version:
git checkout -b v2.2 upstream/master git pull --rebase git push origin v2.2 git checkout master
Step 2: Update project version
In the bi-connector repository under the config/ directory, you
will find a file called build_conf.yaml. Update this file's
version.release key to 2.3:
version: release: '2.3' branch: 'master'
Step 3: Update published branches configuration
Create a new local branch in the
docs-toolsrepository:git checkout -B bi-v2.3 upstream/master git pull --rebase Navigate to the
data/directory and open the file namedbi-connector-published-branches.yaml.Update this file to include a
2.3version and av2.2branch; and set theversion.upcomingkey to2.3.Commit your change and push the commit to origin <local branch>.
Create a separate PR to merge the change to master.
Before | After | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |
Step 4: Update redirects configuration
In the bi-connector repository under the config/ directory, you
will find a file called redirects. Update this file accordingly:
Add
v2.2to theversionslist,Add an
upcomingsymlink,Add a
v2.3symlink so that users can refer tomaster,upcoming, andv2.3interchangeably,Update the
currentsymlink to point tov2.2, andAdd a redirect for the removed file.
- Before
define: prefix bi-connector define: base https://www.mongodb.com/pt-br/docs/${prefix} define: versions v1.1 v2.0 v2.1 master symlink: v2.2 -> master symlink: current -> master - After
define: prefix bi-connector define: base https://www.mongodb.com/pt-br/docs/${prefix} define: versions v1.1 v2.0 v2.1 v2.2 master symlink: v2.3 -> master symlink: upcoming -> master symlink: current -> v2.2 [v2.3-*]: ${prefix}/${version}/tutorial/connecting-to-atlas -> ${base}/${version}/reference/mongosqld
Tip
Redirects for details on the redirects format.
Step 5: Redeploy
Wipe your
builddirectory. Sphinx will not properly rebuild files to include changes to the version selector.Run
make publishon themasterbranch first. This ensures thatmut-redirectscreates symbolic links underbuild/publicfor future builds.Run
make-publishon each branch, going from oldest to newest. For each branch, check the output's version selector to make sure that the version selector looks correct, and then runmake deploy.