update dependency version and add check flag to build
This commit is contained in:
parent
4e5089bb89
commit
2cea801bc7
30
Cargo.toml
30
Cargo.toml
|
@ -24,23 +24,23 @@ watch = ["dep:notify-debouncer-mini", "dep:ctrlc"]
|
||||||
zip = ["shulkerbox/zip"]
|
zip = ["shulkerbox/zip"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.5.4", features = ["deprecated", "derive", "env"] }
|
anyhow = "1.0.89"
|
||||||
|
clap = { version = "4.5.18", features = ["deprecated", "derive", "env"] }
|
||||||
colored = "2.1.0"
|
colored = "2.1.0"
|
||||||
serde = { version = "1.0.197", features = ["derive"] }
|
const_format = "0.2.33"
|
||||||
thiserror = "1.0.58"
|
ctrlc = { version = "3.4.5", optional = true }
|
||||||
toml = "0.8.12"
|
|
||||||
shulkerscript = { git = "https://github.com/moritz-hoelting/shulkerscript-lang.git", features = ["fs_access", "shulkerbox"], default-features = false, rev = "0cccee936e427d8ac2238956d2ef7b240d568e13" }
|
|
||||||
shulkerbox = { git = "https://github.com/moritz-hoelting/shulkerbox.git", default-features = false, rev = "aff342a64a94981af942223345b5a5f105212957" }
|
|
||||||
git2 = { version = "0.19.0", default-features = false }
|
|
||||||
path-absolutize = "3.1.1"
|
|
||||||
dotenvy = "0.15.7"
|
dotenvy = "0.15.7"
|
||||||
notify-debouncer-mini = { version = "0.4.1", default-features = false, optional = true }
|
git2 = { version = "0.19.0", default-features = false }
|
||||||
ctrlc = { version = "3.4.4", optional = true }
|
human-panic = "2.0.1"
|
||||||
tracing = "0.1.40"
|
|
||||||
tracing-subscriber = "0.3.18"
|
|
||||||
# waiting for pull request to be merged
|
# waiting for pull request to be merged
|
||||||
inquire = { git = "https://github.com/moritz-hoelting/rust-inquire.git", branch = "main", package = "inquire" }
|
inquire = { git = "https://github.com/moritz-hoelting/rust-inquire.git", branch = "main", package = "inquire" }
|
||||||
human-panic = "2.0.0"
|
notify-debouncer-mini = { version = "0.4.1", default-features = false, optional = true }
|
||||||
anyhow = "1.0.86"
|
path-absolutize = "3.1.1"
|
||||||
pathdiff = "0.2.1"
|
pathdiff = "0.2.1"
|
||||||
const_format = "0.2.32"
|
serde = { version = "1.0.210", features = ["derive"] }
|
||||||
|
shulkerbox = { git = "https://github.com/moritz-hoelting/shulkerbox.git", default-features = false, rev = "4ca0505e357aa7427657d6286f8a1b77eb7e63c6" }
|
||||||
|
shulkerscript = { git = "https://github.com/moritz-hoelting/shulkerscript-lang.git", features = ["fs_access", "shulkerbox"], default-features = false, rev = "a3e0bd95bc35f2c880ca73e2bfebad95bb937254" }
|
||||||
|
thiserror = "1.0.63"
|
||||||
|
toml = "0.8.19"
|
||||||
|
tracing = "0.1.40"
|
||||||
|
tracing-subscriber = "0.3.18"
|
||||||
|
|
|
@ -40,6 +40,9 @@ pub struct BuildArgs {
|
||||||
/// Skip validating the project for pack format compatibility.
|
/// Skip validating the project for pack format compatibility.
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
pub no_validate: bool,
|
pub no_validate: bool,
|
||||||
|
/// Check if the project can be built without actually building it.
|
||||||
|
#[arg(long)]
|
||||||
|
pub check: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build(args: &BuildArgs) -> Result<()> {
|
pub fn build(args: &BuildArgs) -> Result<()> {
|
||||||
|
@ -132,6 +135,9 @@ pub fn build(args: &BuildArgs) -> Result<()> {
|
||||||
|
|
||||||
let dist_path = dist_path.join(project_config.pack.name + dist_extension);
|
let dist_path = dist_path.join(project_config.pack.name + dist_extension);
|
||||||
|
|
||||||
|
if args.check {
|
||||||
|
print_success("Project is valid and can be built.");
|
||||||
|
} else {
|
||||||
#[cfg(feature = "zip")]
|
#[cfg(feature = "zip")]
|
||||||
if args.zip {
|
if args.zip {
|
||||||
output.zip_with_comment(
|
output.zip_with_comment(
|
||||||
|
@ -152,6 +158,7 @@ pub fn build(args: &BuildArgs) -> Result<()> {
|
||||||
"Finished building{and_package_msg} project to {}",
|
"Finished building{and_package_msg} project to {}",
|
||||||
dist_path.absolutize_from(path)?.display()
|
dist_path.absolutize_from(path)?.display()
|
||||||
));
|
));
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue