mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-03 17:14:08 +02:00
make haze git checkout pick the correct branch by default
This commit is contained in:
parent
755573ba4b
commit
b2a7b22676
4 changed files with 78 additions and 11 deletions
|
|
@ -13,6 +13,7 @@ use crate::php::PhpVersion;
|
|||
use crate::proxy::proxy;
|
||||
use crate::service::ServiceTrait;
|
||||
use crate::service::{RedisTls, Service};
|
||||
use crate::sources::Sources;
|
||||
use bollard::Docker;
|
||||
use itertools::Itertools;
|
||||
use miette::{IntoDiagnostic, Report, Result, WrapErr};
|
||||
|
|
@ -35,6 +36,7 @@ mod network;
|
|||
mod php;
|
||||
mod proxy;
|
||||
mod service;
|
||||
mod sources;
|
||||
|
||||
static FORWARD_ENV: &[&str] = &[
|
||||
"OCC_LOG",
|
||||
|
|
@ -385,7 +387,11 @@ async fn main() -> Result<ExitCode> {
|
|||
}
|
||||
HazeArgs::Git { operation } => match operation {
|
||||
GitOperation::Checkout { branch } => {
|
||||
checkout_all(&config.sources_root, &branch)?;
|
||||
let sources = Sources::new(&config.sources_root)?;
|
||||
checkout_all(
|
||||
&config.sources_root,
|
||||
&branch.unwrap_or_else(|| sources.get_server_version_branch()),
|
||||
)?;
|
||||
}
|
||||
GitOperation::Pull => {
|
||||
pull_all(&config.sources_root)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue