Projet

Général

Profil

« Précédent | Suivant » 

Révision d009115d

Ajouté par Jérôme Schneider il y a plus de 9 ans

setup.py: manage only tag starting v

Voir les différences:

setup.py
7 7
    version = __version__
8 8
    if os.path.exists('.git'):
9 9
        import subprocess
10
        p = subprocess.Popen(['git','describe','--dirty'],
10
        p = subprocess.Popen(['git','describe','--dirty','--match=v*'],
11 11
                stdout=subprocess.PIPE)
12 12
        result = p.communicate()[0]
13 13
        assert p.returncode == 0, 'git returned non-zero'
14
        new_version = result.split()[0]
14
        new_version = result.split()[0][1:]
15 15
        assert new_version.split('-')[0] == version, '__version__ must match the last git annotated tag'
16 16
        version = new_version.replace('-', '.')
17 17
    return version

Formats disponibles : Unified diff