Skip to content

Commit 4addb0a

Browse files
author
Clement Champetier
committed
Sconscript: get version from git
* If GitPython module is available on the python environment, get version of AvTranscoder from the last tag on github repository. * Else AvTranscoder's version is 0.0.1.
1 parent 22499b4 commit 4addb0a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/SConscript

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@ Import( "envPy" )
77
Import( "installPrefix" )
88
Import( "resampleLibraryName" )
99

10-
avTranscoderVersion = "0.0.1"
10+
try:
11+
import git
12+
# Get 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
20+
except Exception:
21+
# Set a default version
22+
avTranscoderVersion = "0.0.1"
1123

1224
env.Append(
1325
SHLIBVERSION = avTranscoderVersion

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy