1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
From: Roger Shimizu <rosh@debian.org>
Date: Sat, 31 Jul 2021 15:58:37 +0900
Subject: Get version from d/changelog instead of .git folder
When building debian package, .git folder won't be copied, so need to
get the version from d/changelog by running dpkg-parsechangelog
command.
---
release/update-manpages | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/release/update-manpages b/release/update-manpages
index 739cedb..db9ebd0 100755
--- a/release/update-manpages
+++ b/release/update-manpages
@@ -56,7 +56,7 @@ def main(argv):
del subcmds.all_commands['branch']
(MANDIR / 'repo-branch.1').write_text('.so man1/repo-branches.1')
- version = RepoSourceVersion()
+ version = subprocess.run("dpkg-parsechangelog -SVersion|sed -e s:-[^-]*$::", capture_output=True, text=True, shell=True).stdout
cmdlist = [['help2man', '-N', '-n', f'repo {cmd} - manual page for repo {cmd}',
'-S', f'repo {cmd}', '-m', 'Repo Manual', f'--version-string={version}',
'-o', MANDIR.joinpath(f'repo-{cmd}.1.tmp'), './repo',
|