Пример #1
0
 def onClicked(event):
     version_string = ''
     if mh.getVersionDigitsStr():
         version_string += mh.getVersionDigitsStr()
     if gitutils.getCurrentBranch():
         version_string += ' ' + gitutils.getCurrentBranch()
     if gitutils.getCurrentCommit(short=True):
         version_string += ':' + gitutils.getCurrentCommit(short=True)
     gui3d.app.clipboard().setText(version_string)
Пример #2
0
    def _checkForGitInfo(self):

        gd = gitutils.findGitDir()
        if not gd is None:
            # There is a .git dir. Assume we're running from source

            self.isRelease = False

            branch = gitutils.getCurrentBranch()
            if not branch is None:
                self.currentBranch = branch

            commit = gitutils.getCurrentCommit(True)
            if not commit is None:
                self.currentShortCommit = commit

            commit = gitutils.getCurrentCommit(False)
            if not commit is None:
                self.currentLongCommit = commit