diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fb8d1b..699aceb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 0.8.2 - 2026-08-23 + +- Resolve Android runtime bundles from the latest PAM runtime release instead + of incorrectly treating the independently versioned Native SDK as a PAM tag. +- Preserve explicit `PAM_RELEASE_BASE_URL` mirrors while normalizing trailing + slashes before resolving verified runtime assets. + ## 0.8.1 - 2026-08-23 - Added production-grade camera, media editing, retained canvas, GPU shader and diff --git a/Cargo.lock b/Cargo.lock index ef51165..38383e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -76,7 +76,7 @@ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "pam-native-cli" -version = "0.8.1" +version = "0.8.2" dependencies = [ "serde", "serde_json", @@ -85,7 +85,7 @@ dependencies = [ [[package]] name = "pam-native-engine" -version = "0.8.1" +version = "0.8.2" dependencies = [ "pam-native-protocol", "ttf-parser", @@ -93,7 +93,7 @@ dependencies = [ [[package]] name = "pam-native-protocol" -version = "0.8.1" +version = "0.8.2" [[package]] name = "proc-macro2" diff --git a/Cargo.toml b/Cargo.toml index 43551da..63acb66 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ members = [ ] [workspace.package] -version = "0.8.1" +version = "0.8.2" edition = "2024" rust-version = "1.88" license = "Apache-2.0" diff --git a/crates/pam-native-cli/src/mobile.rs b/crates/pam-native-cli/src/mobile.rs index bee7216..c7e2918 100644 --- a/crates/pam-native-cli/src/mobile.rs +++ b/crates/pam-native-cli/src/mobile.rs @@ -2277,10 +2277,8 @@ fn install_android_runtime_bundle( native_home: &Path, ) -> Result<(), String> { let asset = "pam-android-runtime.tar.gz"; - let release_tag = format!("v{}", env!("CARGO_PKG_VERSION")); - let base = std::env::var("PAM_RELEASE_BASE_URL").unwrap_or_else(|_| { - format!("https://github.com/push-in/pam/releases/download/{release_tag}") - }); + let configured_base = std::env::var("PAM_RELEASE_BASE_URL").ok(); + let base = android_runtime_release_base(configured_base.as_deref()); if !base.starts_with("https://") && std::env::var_os("PAM_RELEASE_BASE_URL").is_none() { return Err("refusing a non-HTTPS Android runtime release URL".to_owned()); } @@ -2377,6 +2375,13 @@ fn install_android_runtime_bundle( } } +fn android_runtime_release_base(configured: Option<&str>) -> String { + configured + .unwrap_or("https://github.com/push-in/pam/releases/latest/download") + .trim_end_matches('/') + .to_owned() +} + fn download_release_asset(url: &str, destination: &Path, maximum_bytes: u64) -> Result<(), String> { let mut command = Command::new("curl"); if url.starts_with("https://") { @@ -7598,6 +7603,19 @@ mod tests { ))); } + #[test] + fn android_runtime_download_uses_the_pam_release_channel_not_the_sdk_version() { + assert_eq!( + android_runtime_release_base(None), + "https://github.com/push-in/pam/releases/latest/download" + ); + assert_eq!( + android_runtime_release_base(Some("https://mirror.example/pam/v2.0.10/")), + "https://mirror.example/pam/v2.0.10" + ); + assert!(!android_runtime_release_base(None).contains(env!("CARGO_PKG_VERSION"))); + } + #[test] fn development_cleanup_is_scoped_to_generated_artifacts() { let root = std::env::temp_dir().join(format!( diff --git a/packages/native/src/Protocol.php b/packages/native/src/Protocol.php index 715603d..6ed792a 100644 --- a/packages/native/src/Protocol.php +++ b/packages/native/src/Protocol.php @@ -6,7 +6,7 @@ final class Protocol { - public const string SDK_VERSION = '0.8.1'; + public const string SDK_VERSION = '0.8.2'; public const int VERSION = 1; public const string TREE_MAGIC = 'PNT1'; public const string PATCH_MAGIC = 'PNP1'; diff --git a/packages/native/tests/run.php b/packages/native/tests/run.php index e136a36..de38404 100644 --- a/packages/native/tests/run.php +++ b/packages/native/tests/run.php @@ -6215,8 +6215,8 @@ static function () use (&$nestedStateEvents): void { 'Grouped drawer state must restore selection and expanded sections.', ); $assert( - \Pam\Native\Protocol::SDK_VERSION === '0.8.1', - 'The runtime SDK contract must match the 0.8.1 package release.', + \Pam\Native\Protocol::SDK_VERSION === '0.8.2', + 'The runtime SDK contract must match the 0.8.2 package release.', ); $imageEditorParameters = (new ReflectionMethod( \Pam\Native\System\ImageEditor::class,