示例#1
0
文件: config.py 项目: jsargiot/shub
 def get_version(self):
     if self.version == 'AUTO':
         ver = pwd_git_version()
         if not ver:
             ver = pwd_hg_version()
         if not ver:
             ver = str(int(time.time()))
         return ver
     elif self.version == 'GIT':
         return pwd_git_version()
     elif self.version == 'HG':
         return pwd_hg_version()
     elif self.version:
         return str(self.version)
     return str(int(time.time()))
示例#2
0
 def get_version(self):
     if not self.version or self.version == 'AUTO':
         return pwd_version()
     elif self.version == 'GIT':
         return pwd_git_version()
     elif self.version == 'HG':
         return pwd_hg_version()
     elif self.version:
         return str(self.version)
示例#3
0
 def get_version(self):
     if not self.version or self.version == 'AUTO':
         return pwd_version()
     elif self.version == 'GIT':
         return pwd_git_version()
     elif self.version == 'HG':
         return pwd_hg_version()
     elif self.version:
         return str(self.version)
示例#4
0
def _get_dependency_version(name):
    if isdir('.git'):
        return pwd_git_version()
    elif isdir('.hg'):
        return pwd_hg_version()
    elif isdir('.bzr'):
        return pwd_bzr_version()

    return "%s-%s" % (name, run('python setup.py --version'))
示例#5
0
def _get_dependency_version(name):
    if isdir('.git'):
        return pwd_git_version()
    elif isdir('.hg'):
        return pwd_hg_version()
    elif isdir('.bzr'):
        return pwd_bzr_version()

    return "%s-%s" % (name, run('python setup.py --version'))
def _get_version(target, version):
    version = version or target.get('version')
    if version == 'HG':
        return pwd_hg_version()
    elif version == 'GIT':
        return pwd_git_version()
    elif version:
        return str(version)
    else:
        return str(int(time.time()))
示例#7
0
def _get_version(target, version):
    version = version or target.get('version')
    if version == 'HG':
        return pwd_hg_version()
    elif version == 'GIT':
        return pwd_git_version()
    elif version:
        return str(version)
    else:
        return str(int(time.time()))