use asset tool for upload
This commit is contained in:
parent
d2b455c87b
commit
9685301b30
28
src/main.rs
28
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)=>{
|
||||
|
Loading…
Reference in New Issue
Block a user