chore: Ensure cargo installs use version for build scripts image
This commit is contained in:
parent
55c1b087f7
commit
2923c417ab
4 changed files with 17 additions and 27 deletions
|
|
@ -114,18 +114,12 @@ impl BugReportCommand {
|
|||
}
|
||||
|
||||
fn get_recipe(&self) -> Option<Recipe> {
|
||||
let recipe_path = self.recipe_path.clone().map_or_else(
|
||||
|| {
|
||||
get_config_file("recipe", "Enter path to recipe file").map_or_else(
|
||||
|_| {
|
||||
trace!("Failed to get recipe");
|
||||
String::new()
|
||||
},
|
||||
|recipe| recipe,
|
||||
)
|
||||
},
|
||||
|recipe_path| recipe_path,
|
||||
);
|
||||
let recipe_path = self.recipe_path.clone().unwrap_or_else(|| {
|
||||
get_config_file("recipe", "Enter path to recipe file").unwrap_or_else(|_| {
|
||||
trace!("Failed to get recipe");
|
||||
String::new()
|
||||
})
|
||||
});
|
||||
|
||||
Recipe::parse(&recipe_path).ok()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use blue_build_utils::{
|
|||
},
|
||||
syntax_highlighting::{self, DefaultThemes},
|
||||
};
|
||||
use clap::Args;
|
||||
use clap::{crate_version, Args};
|
||||
use log::{debug, info, trace, warn};
|
||||
use typed_builder::TypedBuilder;
|
||||
|
||||
|
|
@ -120,9 +120,12 @@ impl TemplateCommand {
|
|||
.recipe_path(recipe_path.as_path())
|
||||
.registry(self.get_registry())
|
||||
.exports_tag(if shadow::COMMIT_HASH.is_empty() {
|
||||
"latest"
|
||||
// This is done for users who install via
|
||||
// cargo. Cargo installs do not carry git
|
||||
// information via shadow
|
||||
format!("v{}", crate_version!())
|
||||
} else {
|
||||
shadow::COMMIT_HASH
|
||||
shadow::COMMIT_HASH.to_string()
|
||||
})
|
||||
.build();
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ pub struct PushOpts<'a> {
|
|||
pub struct BuildTagPushOpts<'a> {
|
||||
/// The base image name.
|
||||
///
|
||||
/// NOTE: You cannot have this set with archive_path set.
|
||||
/// NOTE: You cannot have this set with `archive-path` set.
|
||||
#[builder(default, setter(into, strip_option))]
|
||||
pub image: Option<Cow<'a, str>>,
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue