From 602c2483a58a094eb5fb41798f5ad6dc134c1291 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 3 Feb 2023 12:39:51 -0800 Subject: [PATCH] Extend cargo2android.py version matching to include alpha and beta crates The ring crate hasn't had a non-alpha release in over two years, and may need to be updated to an alpha release. Modify the version regex in cargo2android.py to recognize the alpha version as part of the version suffix. Test: manually run cargo2android.py in redshell Change-Id: If48d5be339d10bc3e6651485b0038b7219403077 --- scripts/cargo2android.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cargo2android.py b/scripts/cargo2android.py index b3c96b0e0..79005f8c8 100755 --- a/scripts/cargo2android.py +++ b/scripts/cargo2android.py @@ -142,7 +142,7 @@ CARGO_TEST_LIST_END_PAT = re.compile('^(\d+) tests?, (\d+) benchmarks$') CARGO2ANDROID_RUNNING_PAT = re.compile('^### Running: .*$') # Rust package name with suffix -d1.d2.d3(+.*)?. -VERSION_SUFFIX_PAT = re.compile(r'^(.*)-[0-9]+\.[0-9]+\.[0-9]+(?:\+.*)?$') +VERSION_SUFFIX_PAT = re.compile(r'^(.*)-[0-9]+\.[0-9]+\.[0-9]+(?:-(alpha|beta)\.[0-9]+)?(?:\+.*)?$') # Crate types corresponding to a C ABI library C_LIBRARY_CRATE_TYPES = ['staticlib', 'cdylib']