2020-02-05 22:16:58 +00:00
|
|
|
#!/bin/sh
|
|
|
|
read junk pkgname <debian/control
|
|
|
|
read shortver <../../version/short.txt
|
|
|
|
git log --pretty='format:'"$pkgname"' (SHA:%H) unstable; urgency=low
|
|
|
|
|
|
|
|
* %s
|
|
|
|
|
|
|
|
-- %aN <%aE> %aD
|
|
|
|
' . |
|
|
|
|
python -Sc '
|
|
|
|
import os, re, subprocess, sys
|
|
|
|
|
|
|
|
first = True
|
|
|
|
def Describe(g):
|
|
|
|
global first
|
|
|
|
if first:
|
|
|
|
s = sys.argv[1]
|
|
|
|
first = False
|
|
|
|
else:
|
|
|
|
sha = g.group(1)
|
2020-02-11 19:26:11 +00:00
|
|
|
s = subprocess.check_output(["git", "describe", "--always", "--", sha]).strip().decode("utf-8")
|
2020-02-05 22:16:58 +00:00
|
|
|
return re.sub(r"^\D*", "", s)
|
|
|
|
|
|
|
|
print(re.sub(r"SHA:([0-9a-f]+)", Describe, sys.stdin.read()))
|
|
|
|
' "$shortver"
|