mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-27 03:55:36 +00:00
ea11d58e96
It seems changelog generation got broken by moving the code between corp and OSS repos, because one of the commit SHAs doesn't have an associated tag. In the interest of fixing the build, and because we're not yet trying to upstream the debian package, I fixed this by allowing hash-based versions to show up in the changelog. This maybe wrong from a debian standards perspective, but for our current point in life it'll work until we learn to do it better. Signed-Off-By: David Anderson <dave@natulte.net>
26 lines
566 B
Bash
Executable File
26 lines
566 B
Bash
Executable File
#!/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)
|
|
s = subprocess.check_output(["git", "describe", "--always", "--", sha]).strip().decode("utf-8")
|
|
return re.sub(r"^\D*", "", s)
|
|
|
|
print(re.sub(r"SHA:([0-9a-f]+)", Describe, sys.stdin.read()))
|
|
' "$shortver"
|