use asset tool for upload

This commit is contained in:
Quaternions 2024-04-24 22:02:26 -07:00
parent d2b455c87b
commit 9685301b30

View File

@ -446,11 +446,15 @@ fn upload() -> AResult<()>{
} }
match upload_action { match upload_action {
UploadAction::Upload(asset_id) => { UploadAction::Upload(asset_id) => {
let status=std::process::Command::new("../rbxcompiler-linux-amd64") let status=std::process::Command::new("asset-tool")
.arg("--compile=false") .args([
.arg("--group=6980477") "upload",
.arg(format!("--asset={}",asset_id)) "--cookie-type","environment",
.arg(format!("--input={}",file_thing.path().into_os_string().into_string().unwrap())) "--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()?; .status()?;
match status.code() { match status.code() {
Some(0)=>{ Some(0)=>{
@ -465,11 +469,15 @@ fn upload() -> AResult<()>{
} }
UploadAction::Skip => continue, UploadAction::Skip => continue,
UploadAction::New => { UploadAction::New => {
let output=std::process::Command::new("../rbxcompiler-linux-amd64") let output=std::process::Command::new("asset-tool")
.arg("--compile=false") .args([
.arg("--group=6980477") "create",
.arg("--new-asset=true") "--cookie-type","environment",
.arg(format!("--input={}",file_thing.path().into_os_string().into_string().unwrap())) "--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()?; .output()?;
match output.status.code() { match output.status.code() {
Some(0)=>{ Some(0)=>{