Skip to content

Publishing Logic

Bob Swift edited this page Dec 6, 2020 · 11 revisions

Publishing Logic (DRAFT)

Updates to the documentation are published automatically when changes are made to the master branch or a version branch which is a branch named with the {major}.{minor} level version number without the initial 'v' (e.g.: 2.5 or 3.0). Publication to a version branch will only happen if the version has already been published on the master branch. Changes can come from merging a pull request or from a push to the branch. The version number and versions list is provided in the conf.py file in the branch being processed. The cumulative list of published versions is provided from a persistent information file maintained by the publish.py script. The version number from conf.py is validated to ensure that it follows the format v{major}.{minor}[.{micro}] where {major}, {minor} and {micro} are integers containing only digits. The .{micro} portion is optional and is removed when determining which version of the documentation to update. Documentation published as latest from the master branch can also include alpha, beta or release candidate designations in the version number (e.g.: 2.6b2 or 3.0rc1); however, these should not be included in the versions list information and will not be added to the published versions list. Information pushed to the master branch will always be published as latest.

The logic used is:

  1. Is this the master branch?

    • Yes: Publish as latest and go to Step 2.
    • No: Go to Step 5.
  2. Is the version number valid?

    • Yes: Go to Step 3.
    • No: Quit.
  3. Is the major.minor portion of the version number in the versions list?

    • Yes: Publish as major.minor portion of the version number and go to Step 4.
    • No: Quit.
  4. is the major.minor portion of the version number in the published versions list?

    • Yes: Quit.
    • No: Add major.minor portion of the version number to published versions, update persistent information file and quit.
  5. Is the version number valid?

    • Yes: Go to Step 6.
    • No: Quit.
  6. Is the branch name the same as the major.minor portion of the version number without the leading 'v'?

    • Yes: Go to Step 7.
    • No: Quit.
  7. is the major.minor portion of the version number in the published versions list?

    • Yes: Publish as major.minor portion of the version number and quit.
    • No: Quit.

Publishing Logic Flowchart

Clone this wiki locally