Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-489

Pull version for docs from git tag

    XMLWordPrintable

Details

    • Story
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • 4.0.8, 3.0.13, 5.0.5
    • None
    • None

    Description

      Rather than waste time remembering to bump versions for docs in the docs directory. We should pull that information automatically from git tags. This has been done before in LF tooling projects so we can port that into MD-SAL.

      # The version info for the project you're documenting, acts as replacement for
      # |version| and |release|, also used in various other places throughout the
      # built documents.
      #
      # The short X.Y version.
      command = 'git describe --tags --long --dirty'
      try:
          git_version = format_version(
              subprocess.check_output(command.split()).decode('utf-8').strip())
      except subprocess.CalledProcessError:  # Handle docs builds from tarball
          git_version = "v0.0.9999-local"
      version = git_version
      # The full version, including alpha/beta/rc tags.
      release = version
      

      Source: https://github.com/lfit/releng-global-jjb/blob/master/docs/conf.py#L80-L93

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              zxiiro Thanh Ha (zxiiro)
              zxiiro Thanh Ha (zxiiro)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: