Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-58283

Add a new versioning file to set MONGO_VERSION and MONGO_GIT_HASH

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.16, 4.4.8, 5.0.2, 4.0.27, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v5.0, v4.4, v4.2, v4.0
    • Dev Platform 2021-07-12

      Write a new variables file called "etc/scons/developer_versioning.vars" that sets MONGO_VERSION using the latest git tag and MONGO_GIT_HASH with some string constant. It may look something like this:

      import os
      import subprocess
      
      def short_describe():
      import os
      import subprocess
      with open(os.devnull, "r+") as devnull:
      proc = subprocess.Popen("git describe --abbrev=0",
      stdout=subprocess.PIPE,
      stderr=devnull,
      stdin=devnull,
      shell=True)
      return proc.communicate()[0].decode('utf-8').strip()[1:]
      
      MONGO_GIT_HASH="unknown"
      MONGO_VERSION=short_describe()
      

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            xuerui.fa@mongodb.com Xuerui Fa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: