osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ci/+/40426?usp=email )
Change subject: OBS: repo without manuals: fix draft removal logic
......................................................................
OBS: repo without manuals: fix draft removal logic
Adjust set_asciidoc_style_without_draft_watermark() so it does not fail
in repositories that do not have any manuals.
Fixes: 3b348d5e ("OBS: remove pdf draft watermark for latest pkgs")
Change-Id: Ie93430a1f7bd2bae6886e87755e79ff93ea609e7
---
M scripts/obs/lib/srcpkg.py
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/26/40426/1
diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py
index 6f4e613..3a09af3 100644
--- a/scripts/obs/lib/srcpkg.py
+++ b/scripts/obs/lib/srcpkg.py
@@ -169,10 +169,12 @@
def set_asciidoc_style_without_draft_watermark(project):
repo_path = lib.git.get_repo_path(project)
- doc_makefiles = lib.run_cmd(["grep", "-r", "-l",
"include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.asciidoc.inc"], cwd=repo_path)
+ doc_makefiles = lib.run_cmd(["grep", "-r", "-l",
"include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.asciidoc.inc"], cwd=repo_path,
check=False)
doc_makefiles = doc_makefiles.output.rstrip().split("\n")
for doc_makefile in doc_makefiles:
+ if doc_makefile == "":
+ continue
print(f"{project}: setting asciidoc style to remove draft watermark in
{doc_makefile}")
lib.run_cmd(["sed", "-i",
'/\\/build\\/Makefile\\.asciidoc\\.inc/s/^/ ASCIIDOCSTYLE =
$(BUILDDIR)\\/custom-dblatex.sty\\n/',
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ci/+/40426?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ie93430a1f7bd2bae6886e87755e79ff93ea609e7
Gerrit-Change-Number: 40426
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>