Skip to content

Commit f0c0704

Browse files
Merge pull request #71 from cchampet/build_requirements_git
Build requirements GitPython
2 parents 62f5670 + d2df7f5 commit f0c0704

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Based on library to support various video formats, avTrasncoder provide the high
66

77
You can also use it in Java & Python for simpliest integration in projects.
88

9+
#### Requirements
10+
* GitPython (>=0.3.2)
11+
912
#### Continuous Integration
1013

1114
###### Drone.io

src/SConscript

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
11
import glob, re
22
import os
33
import sys
4+
import git
45

56
Import( "env" )
67
Import( "envJava" )
78
Import( "envPy" )
89
Import( "installPrefix" )
910
Import( "resampleLibraryName" )
1011

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." )
2620

2721
env.Append(
2822
SHLIBVERSION = avTranscoderVersion

0 commit comments

Comments
 (0)