1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
Description: 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.
Author: Roger Shimizu <rosh@debian.org>
Forwarded: not-needed
--- a/release/update_manpages.py
+++ b/release/update_manpages.py
@@ -36,7 +36,6 @@ MANDIR = TOPDIR.joinpath("man")
# Load repo local modules.
sys.path.insert(0, str(TOPDIR))
-from git_command import RepoSourceVersion
import subcmds
@@ -74,7 +73,12 @@ def main(argv: List[str]) -> int:
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",
|