Skip to content

Build requirements GitPython #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 9 additions & 15 deletions src/SConscript
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
import glob, re
import os
import sys
import git

Import( "env" )
Import( "envJava" )
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
Expand Down