fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/37675?usp=email )
Change subject: OBS: use r-strings for git_latest_tag_pattern_{default,other} ......................................................................
OBS: use r-strings for git_latest_tag_pattern_{default,other}
This way we don't need to escape characters like '', that is itself an escape character in regular expressions.
Change-Id: I86c6d2180e1934563ace08a20ed6a8b3435585ca --- M scripts/obs/lib/config.py 1 file changed, 19 insertions(+), 7 deletions(-)
Approvals: pespin: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified
diff --git a/scripts/obs/lib/config.py b/scripts/obs/lib/config.py index 1ad0106..95f89fd 100644 --- a/scripts/obs/lib/config.py +++ b/scripts/obs/lib/config.py @@ -114,14 +114,14 @@ "open5gs": "main", }
-git_latest_tag_pattern_default = "^[0-9]*\.[0-9]*\.[0-9]*$" +git_latest_tag_pattern_default = r'^[0-9]*.[0-9]*.[0-9]*$' git_latest_tag_pattern_other = { - "limesuite": "^v[0-9]*\.[0-9]*\.[0-9]*$", - "open5gs": "^v[0-9]*\.[0-9]*\.[0-9]*$", - "osmo-fl2k": "^v[0-9]*\.[0-9]*\.[0-9]*$", - "rtl-sdr": "^v[0-9]*\.[0-9]*\.[0-9]*$", - "strongswan-epdg": "^osmo-epdg-[0-9]*\.[0-9]*\.[0-9a-z]*$", - "wireshark": "^v[0-9]*\.[0-9]*\.[0-9a-z]*$", + "limesuite": r'^v[0-9]*.[0-9]*.[0-9]*$', + "open5gs": r'^v[0-9]*.[0-9]*.[0-9]*$', + "osmo-fl2k": r'^v[0-9]*.[0-9]*.[0-9]*$', + "rtl-sdr": r'^v[0-9]*.[0-9]*.[0-9]*$', + "strongswan-epdg": r'^osmo-epdg-[0-9]*.[0-9]*.[0-9a-z]*$', + "wireshark": r'^v[0-9]*.[0-9]*.[0-9a-z]*$', }
docker_distro_default = "debian:12"