osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/28904 )
Change subject: obs: fix_source_format: ignore missing \n ......................................................................
obs: fix_source_format: ignore missing \n
Apparently a \n at the end of debian/source/format is not required, so don't fix it if it is missing. This avoids printing this confusing line: osmo-trx: fixing debian/source/format (3.0 (native) => 3.0 (native))
Change-Id: I7f9bb22a389a2109109f7fecd3b7ae0413fe6f5b --- M scripts/obs/lib/debian.py 1 file changed, 4 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/04/28904/1
diff --git a/scripts/obs/lib/debian.py b/scripts/obs/lib/debian.py index af152da..89153fb 100644 --- a/scripts/obs/lib/debian.py +++ b/scripts/obs/lib/debian.py @@ -59,15 +59,14 @@ if not os.path.exists(format_path): return
- expected = "3.0 (native)\n" - current = open(format_path, "r").read() + expected = "3.0 (native)" + current = open(format_path, "r").read().rstrip()
if current == expected: return
- print(f"{project}: fixing debian/source/format ({current.rstrip()} =>" - f" {expected.rstrip()})") - open(format_path, "w").write(expected) + print(f"{project}: fixing debian/source/format ({current} => {expected})") + open(format_path, "w").write(f"{expected}\n")
def get_last_version_from_changelog(project):