diff --git a/README.md b/README.md index 966b2dfb..f16363e8 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,9 @@ Based on library to support various video formats, avTrasncoder provide the high You can also use it in Java & Python for simpliest integration in projects. +#### Requirements +* GitPython (>=0.3.2) + #### Continuous Integration ###### Drone.io diff --git a/src/SConscript b/src/SConscript index 8099ff92..a081959d 100644 --- a/src/SConscript +++ b/src/SConscript @@ -1,6 +1,7 @@ import glob, re import os import sys +import git Import( "env" ) Import( "envJava" ) @@ -8,21 +9,14 @@ Import( "envPy" ) Import( "installPrefix" ) Import( "resampleLibraryName" ) -# Set a default version -avTranscoderVersion = "0.0.1" - -try: - import git - # Get last tag of git repository - repo = git.Repo( "." ) - tags = repo.tags - if tags: - lastTag = tags[-1] - avTranscoderVersion = lastTag.name[1:] - else: - raise -except Exception: - print "Warning: Can't access the last tag of git repository ; default version will be '0.0.1'." +# Get version from last tag of git repository +repo = git.Repo( "." ) +tags = repo.tags +if tags: + lastTag = tags[-1] + avTranscoderVersion = lastTag.name[1:] +else: + raise Exception( "Can't get last version of AvTranscoder." ) env.Append( SHLIBVERSION = avTranscoderVersion