File: get-version-from-d-changelog-instead-of-.git-folder.patch

package info (click to toggle)
repo 2.58-3
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 1,736 kB
  • sloc: python: 21,063; sh: 99; makefile: 13
file content (23 lines) | stat: -rw-r--r-- 753 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
@@ -57,7 +57,12 @@ 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",