From 9685301b30df118bbde05fc996fa6a09fd57feb6 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 24 Apr 2024 22:02:26 -0700 Subject: [PATCH] use asset tool for upload --- src/main.rs | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3079b5b..13860c5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -446,11 +446,15 @@ fn upload() -> AResult<()>{ } match upload_action { UploadAction::Upload(asset_id) => { - let status=std::process::Command::new("../rbxcompiler-linux-amd64") - .arg("--compile=false") - .arg("--group=6980477") - .arg(format!("--asset={}",asset_id)) - .arg(format!("--input={}",file_thing.path().into_os_string().into_string().unwrap())) + let status=std::process::Command::new("asset-tool") + .args([ + "upload", + "--cookie-type","environment", + "--cookie","RBXCOOKIE", + "--group","6980477" + ]) + .arg("--asset-id").arg(asset_id.to_string()) + .arg("--input-file").arg(file_thing.path().into_os_string().into_string().unwrap()) .status()?; match status.code() { Some(0)=>{ @@ -465,11 +469,15 @@ fn upload() -> AResult<()>{ } UploadAction::Skip => continue, UploadAction::New => { - let output=std::process::Command::new("../rbxcompiler-linux-amd64") - .arg("--compile=false") - .arg("--group=6980477") - .arg("--new-asset=true") - .arg(format!("--input={}",file_thing.path().into_os_string().into_string().unwrap())) + let output=std::process::Command::new("asset-tool") + .args([ + "create", + "--cookie-type","environment", + "--cookie","RBXCOOKIE", + "--group","6980477" + ]) + .arg("--model-name").arg(modelname.as_str()) + .arg("--input-file").arg(file_thing.path().into_os_string().into_string().unwrap()) .output()?; match output.status.code() { Some(0)=>{