Skip to content

Commit 50af6d7

Browse files
committed
Have samply exit after auto-upload; version bump
1 parent 9a5a65e commit 50af6d7

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samply-api/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,11 @@ impl<'a, H: FileAndPathHelper> Api<'a, H> {
205205
let asm_api = AsmApi::new(self.symbol_manager);
206206
asm_api.query_api_json(request_json_data).await
207207
} else if request_url == "/auto-upload-reply/v1" {
208-
println!("AUTO_UPLOAD_REPLY: {}", request_json_data);
209-
"".to_owned()
208+
use std::io::Write;
209+
210+
println!("SAMPLY_AUTO_UPLOAD_REPLY: {}", request_json_data);
211+
let _ = std::io::stdout().flush();
212+
std::process::exit(0);
210213
} else {
211214
json!({ "error": format!("Unrecognized URL {request_url}") }).to_string()
212215
}

samply/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "usamply"
3-
version = "0.12.10-prerelease.2"
3+
version = "0.12.10-prerelease.3"
44
authors = ["Markus Stange <mstange@themasta.com>", "Vladimir Vukicevic <vladimir@pobox.com>"]
55
edition = "2021"
66
rust-version = "1.75" # needed by wholesym -> fs4

samply/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ struct ServerArgs {
300300
#[arg(short, long)]
301301
verbose: bool,
302302

303-
/// Auto-upload the profile and print the result URL
303+
/// Auto-upload the profile and print the result URL as JSON prefixed
304+
/// with SAMPLY_AUTO_UPLOAD_URL. The samply process will exit after the upload.
304305
#[arg(long)]
305306
auto_upload_profile: bool,
306307
}

0 commit comments

Comments
 (0)