File: set_vcs_version

package info (click to toggle)
varnish 7.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 13,264 kB
  • sloc: ansic: 104,168; python: 2,669; makefile: 1,303; sh: 1,077; awk: 114; perl: 95; ruby: 33
file content (16 lines) | stat: -rw-r--r-- 496 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- a/include/generate.py
+++ b/include/generate.py
@@ -62,6 +62,13 @@ v = subprocess.check_output([
     (os.path.join(srcroot, ".git"))
     ], shell=True, universal_newlines=True).strip()
 
+# override VCS_Version with the content of debian/vcs_version, if it exists
+try:
+    v = open(os.path.join(srcroot, "debian", "vcs_version")).readline().strip()
+except IOError as e:
+    if e.errno != errno.ENOENT:
+        raise
+
 vcsfn = os.path.join(srcroot, "include", "vcs_version.h")
 
 try: