Compare commits

...

9 Commits

Author SHA1 Message Date
4ffeaa5784 Merge pull request 'v0.4.7 user inventory + git fix' (#8) from staging into master
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Reviewed-on: StrafesNET/asset-tool#8
2024-10-01 20:10:30 +00:00
a693da9cb2 asset-tool v0.4.7 user inventory + git fix
All checks were successful
continuous-integration/drone/push Build is passing
2024-10-01 13:08:35 -07:00
a572d10447 support output-folder option for git-related features
Repository-based logic seems to automatically be made relative to the top-level path the repo was initialised with, so we can actually support an output folder with no issues here
2024-10-01 13:08:26 -07:00
1b2e13b4c7 fix decompiling history into git
Why does this work and the version with the directory doesn't? yeah idk. But hey, this one successfully stages the files, so ill take it
2024-10-01 13:08:23 -07:00
607f964928 Merge pull request 'add documentation, update dependencies' (#6) from staging into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: StrafesNET/asset-tool#6
2024-09-17 04:44:30 +00:00
8dc7c96f2d Merge pull request 'Create multiple assets concurrently' (#5) from staging into master
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Reviewed-on: StrafesNET/asset-tool#5
2024-08-17 18:00:27 +00:00
68d751f81f Merge pull request 'use old api for download, error on http status' (#4) from staging into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: StrafesNET/asset-tool#4
2024-07-16 18:21:06 +00:00
c2052be036 Merge pull request 'use old api for compile-upload-asset' (#3) from staging into master
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Reviewed-on: StrafesNET/asset-tool#3
2024-07-10 17:18:05 +00:00
2e9485dea6 Merge pull request 'add old asset upload api' (#2) from staging into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: StrafesNET/asset-tool#2
2024-07-10 16:45:17 +00:00
3 changed files with 10 additions and 10 deletions

2
Cargo.lock generated
View File

@ -110,7 +110,7 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
[[package]]
name = "asset-tool"
version = "0.4.6"
version = "0.4.7"
dependencies = [
"anyhow",
"clap",

View File

@ -1,7 +1,7 @@
workspace = { members = ["rbx_asset", "rox_compiler"] }
[package]
name = "asset-tool"
version = "0.4.6"
version = "0.4.7"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -325,8 +325,8 @@ struct DownloadDecompileSubcommand{
struct DecompileHistoryIntoGitSubcommand{
#[arg(long)]
input_folder:PathBuf,
//currently output folder must be the current folder due to git2 limitations
//output_folder:cli.output.unwrap(),
#[arg(long)]
output_folder:Option<PathBuf>,
#[arg(long)]
style:Style,
#[arg(long)]
@ -351,8 +351,8 @@ struct DownloadAndDecompileHistoryIntoGitSubcommand{
cookie_envvar:Option<String>,
#[arg(long,group="cookie",required=true)]
cookie_file:Option<PathBuf>,
//currently output folder must be the current folder due to git2 limitations
//output_folder:cli.output.unwrap(),
#[arg(long)]
output_folder:Option<PathBuf>,
#[arg(long)]
style:Style,
#[arg(long)]
@ -590,7 +590,7 @@ async fn main()->AResult<()>{
git_committer_name:subcommand.git_committer_name,
git_committer_email:subcommand.git_committer_email,
input_folder:subcommand.input_folder,
output_folder:std::env::current_dir()?,
output_folder:subcommand.output_folder.unwrap_or_else(||std::env::current_dir().unwrap()),
style:subcommand.style.rox(),
write_template:subcommand.write_template.unwrap_or(false),
write_models:subcommand.write_models.unwrap_or(false),
@ -605,7 +605,7 @@ async fn main()->AResult<()>{
subcommand.cookie_file,
).await?,
asset_id:subcommand.asset_id,
output_folder:std::env::current_dir()?,
output_folder:subcommand.output_folder.unwrap_or_else(||std::env::current_dir().unwrap()),
style:subcommand.style.rox(),
write_template:subcommand.write_template.unwrap_or(false),
write_models:subcommand.write_models.unwrap_or(false),
@ -1266,11 +1266,11 @@ async fn write_commit(config:WriteCommitConfig,b:Result<AResult<(AssetVersion,ro
let sig=git2::Signature::new(config.git_committer_name.as_str(),config.git_committer_email.as_str(),&git2::Time::new(date.timestamp(),0)).unwrap();
let tree_id={
let mut tree_index = repo.index()?;
match tree_index.add_all(std::iter::once(config.output_folder.as_path()),git2::IndexAddOption::DEFAULT,None){
match tree_index.add_all(std::iter::once("*"),git2::IndexAddOption::DEFAULT,None){
Ok(_)=>(),
Err(e)=>println!("tree_index.add_all error: {}",e),
}
match tree_index.update_all(std::iter::once(config.output_folder.as_path()),None){
match tree_index.update_all(std::iter::once("*"),None){
Ok(_)=>(),
Err(e)=>println!("tree_index.update_all error: {}",e),
}