fix(release): support incremental particle revisions after native 13.6.1 upgrade
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
This commit is contained in:
@@ -97,20 +97,33 @@ def main() -> None:
|
||||
)
|
||||
readme.write_text(readme_text)
|
||||
|
||||
# Both Expo plugins must request the same upstream Native base as the new AAR.
|
||||
# The Expo plugins already pin the upstream native base on subsequent
|
||||
# revisions of the same MapLibre release. Accept the current base without
|
||||
# requiring the long-obsolete 13.4.1 literal on every release.
|
||||
for relative in (
|
||||
"packages/maplibre-particle-rn/app.plugin.js",
|
||||
"integration/react-native/MapLibreParticleRNTestHost/plugins/withParticleNativeAndroid.js",
|
||||
):
|
||||
replace_exact(ROOT / relative,
|
||||
'nativeVersion", "13.4.1"',
|
||||
f'nativeVersion", "{android_base}"')
|
||||
path = ROOT / relative
|
||||
text = path.read_text()
|
||||
matches = re.findall(r'nativeVersion", "([0-9]+\.[0-9]+\.[0-9]+)"', text)
|
||||
if len(matches) != 1:
|
||||
die(f"expected one Expo nativeVersion in {path}")
|
||||
current_native = matches[0]
|
||||
if current_native not in {base_version(previous_rn_version), android_base}:
|
||||
die(f"unexpected Expo nativeVersion {current_native} in {path}")
|
||||
if current_native != android_base:
|
||||
replace_exact(path,
|
||||
f'nativeVersion", "{current_native}"',
|
||||
f'nativeVersion", "{android_base}"')
|
||||
|
||||
podspec = RN_ROOT / "MapLibreParticleRN.podspec"
|
||||
podtext = podspec.read_text()
|
||||
if podtext.count('11.3.6') != 2:
|
||||
die("podspec must contain exactly two pinned RN 11.3.6 references")
|
||||
podspec.write_text(podtext.replace("11.3.6", "11.5.0"))
|
||||
if podtext.count("11.3.6") == 2:
|
||||
# One-time upgrade from the original MapLibre RN peer baseline.
|
||||
podspec.write_text(podtext.replace("11.3.6", "11.5.0"))
|
||||
elif podtext.count("11.5.0") != 2:
|
||||
die("podspec must contain exactly two pinned RN 11.5.0 references")
|
||||
|
||||
host_path = ROOT / "integration/react-native/MapLibreParticleRNTestHost/package.json"
|
||||
host = json.loads(host_path.read_text())
|
||||
|
||||
Reference in New Issue
Block a user