laforge submitted this change.
obs/lib/srcpkg: also rstrip() the output of git-version-gen
Ensures there is no trailing newline or space at the end of the version.
Change-Id: Ieab16b9f497a264ee025e4da362005630e83c1bb
---
M scripts/obs/lib/srcpkg.py
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py
index e24f25e..9dcb33f 100644
--- a/scripts/obs/lib/srcpkg.py
+++ b/scripts/obs/lib/srcpkg.py
@@ -31,7 +31,7 @@
# Run git-version-gen if it is in the repository
script_path = f"{repo_path}/git-version-gen"
if os.path.exists(script_path):
- ret = lib.run_cmd([script_path, "."], cwd=repo_path).output
+ ret = lib.run_cmd([script_path, "."], cwd=repo_path).output.rstrip()
if not ret:
lib.exit_error_cmd(ret, "empty output from git-version-gen")
return ret
To view, visit change 37475. To unsubscribe, or for help writing mail filters, visit settings.