Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
26 changes: 22 additions & 4 deletions crates/pam-native-cli/src/mobile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down Expand Up @@ -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://") {
Expand Down Expand Up @@ -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!(
Expand Down
2 changes: 1 addition & 1 deletion packages/native/src/Protocol.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions packages/native/tests/run.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down