File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change 1
1
import glob , re
2
2
import os
3
3
import sys
4
+ import git
4
5
5
6
Import ( "env" )
6
7
Import ( "envJava" )
7
8
Import ( "envPy" )
8
9
Import ( "installPrefix" )
9
10
Import ( "resampleLibraryName" )
10
11
11
- # Set a default version
12
- avTranscoderVersion = "0.0.1"
13
-
14
- try :
15
- import git
16
- # Get last tag of git repository
17
- repo = git .Repo ( "." )
18
- tags = repo .tags
19
- if tags :
20
- lastTag = tags [- 1 ]
21
- avTranscoderVersion = lastTag .name [1 :]
22
- else :
23
- raise
24
- except Exception :
25
- print "Warning: Can't access the last tag of git repository ; default version will be '0.0.1'."
12
+ # Get version from last tag of git repository
13
+ repo = git .Repo ( "." )
14
+ tags = repo .tags
15
+ if tags :
16
+ lastTag = tags [- 1 ]
17
+ avTranscoderVersion = lastTag .name [1 :]
18
+ else :
19
+ raise Exception ( "Can't get last version of AvTranscoder." )
26
20
27
21
env .Append (
28
22
SHLIBVERSION = avTranscoderVersion
You can’t perform that action at this time.
0 commit comments