Skip to content

Commit

Permalink
Rename qmod build to qmod manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernthedev committed Mar 14, 2024
1 parent 7a0c8d8 commit 7675470
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
File renamed without changes.
18 changes: 14 additions & 4 deletions src/commands/qmod/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::path::PathBuf;

use clap::{Args, Subcommand};
use color_eyre::{eyre::ensure, Result};
use color_eyre::{eyre::ensure, owo_colors::OwoColorize, Result};

use qpm_package::{
extensions::package_metadata::PackageMetadataExtensions,
Expand All @@ -16,9 +16,9 @@ use crate::models::{

use super::Command;

mod build;
mod create;
mod edit;
mod manifest;

#[derive(Args, Debug, Clone)]

Expand All @@ -35,7 +35,9 @@ pub enum QmodOperation {
/// Some properties are not settable through the qmod create command, these properties are either editable through the package, or not at all
Create(create::CreateQmodJsonOperationArgs),
/// This will parse the `mod.template.json` and process it, then finally export a `mod.json` for packaging and deploying.
Build(build::BuildQmodOperationArgs),
Manifest(manifest::BuildQmodOperationArgs),
/// Deprecated alias for manifest
Build(manifest::BuildQmodOperationArgs),
/// Edit your mod.template.json from the command line, mostly intended for edits on github actions
///
/// Some properties are not editable through the qmod edit command, these properties are either editable through the package, or not at all
Expand All @@ -46,7 +48,15 @@ impl Command for QmodCommand {
fn execute(self) -> Result<()> {
match self.op {
QmodOperation::Create(q) => create::execute_qmod_create_operation(q),
QmodOperation::Build(b) => build::execute_qmod_build_operation(b),
QmodOperation::Build(b) => {
println!(
"{} is deprecated, switch to {}",
"qpm qmod build".yellow(),
"qpm qmod manifest".green()
);
manifest::execute_qmod_build_operation(b)
}
QmodOperation::Manifest(b) => manifest::execute_qmod_build_operation(b),
QmodOperation::Edit(e) => e.execute(),
}
}
Expand Down

0 comments on commit 7675470

Please sign in to comment.