Skip to content

Commit 12e07c5

Browse files
committed
Improved logging, new artifactory token handling, improved run argument handling
1 parent 706b799 commit 12e07c5

File tree

13 files changed

+218
-99
lines changed

13 files changed

+218
-99
lines changed

Cargo.lock

+59-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mb"
3-
version = "0.7.1"
3+
version = "0.8.0"
44
description = "Build automation tool"
55
authors = ["Johannes Asal"]
66
license = "MIT"
@@ -36,8 +36,12 @@ koto_tempfile = { version = "0.14.1", default-features = false, features = ["rc"
3636
koto_toml = { version = "0.14.1", default-features = false, features = ["rc"] }
3737
koto_yaml = { version = "0.14.1", default-features = false, features = ["rc"] }
3838
lazy_static = "1"
39+
log = "0.4.21"
40+
metabuild-git = { path = "metabuild-git" }
41+
metabuild-resolver = { path = "metabuild-resolver" }
3942
once_cell = "1"
4043
path-absolutize = "3.0.14"
44+
pretty_env_logger = "0.5.0"
4145
regex = "1"
4246
resolvo = "0.2.0"
4347
rustls = "0.22.4" # keep fixed
@@ -57,8 +61,6 @@ ureq = { version = "2.9.7", features = ["gzip", "tls"] }
5761
url = "2.5.1"
5862
which = "4.4"
5963
zip = { version = "0.6", features = ["deflate"] }
60-
metabuild-git = { path = "metabuild-git" }
61-
metabuild-resolver = { path = "metabuild-resolver" }
6264

6365
[dev-dependencies]
6466
futures-executor = "0.3"

metabuild-resolver/Cargo.toml

+11-10
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,22 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9+
anyhow = "1.0.86"
910
auth-git2 = "0.5.3"
10-
indexmap = { version = "2.2.6", features = ["serde"] }
11+
dirs = "5.0.1"
1112
git2 = "0.18.3"
13+
indexmap = { version = "2.2.6", features = ["serde"] }
14+
itertools = "0.13.0"
15+
log = "0.4.21"
1216
metabuild-git = { path = "../metabuild-git" }
17+
reqwest = "0.12.4"
1318
resolvo = "0.4.1"
14-
toml = "0.8.13"
19+
rustls-native-certs = "*"
1520
semver = "1.0.23"
1621
serde = { version = "1.0.203", features = ["derive"] }
1722
serde_json = "1.0.117"
18-
tracing = "0.1.40"
19-
itertools = "0.13.0"
20-
anyhow = "1.0.86"
21-
reqwest = "0.12.4"
22-
rustls-native-certs = "*"
23-
dirs = "5.0.1"
24-
yaml-rust = "0.4.5"
2523
tempfile = "3.10.1"
26-
ureq = { version = "2.9.7", features = ["native-certs", "gzip", "tls", "json"] }
24+
toml = "0.8.13"
25+
tracing = "0.1.40"
26+
ureq = { version = "2.9.7", features = ["native-certs", "gzip", "tls", "json"] }
27+
yaml-rust = "0.4.5"

metabuild-resolver/src/index.rs

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use crate::repository::{BareRepository, RefType};
22
use anyhow::Error;
33
use indexmap::IndexMap;
4+
use log::debug;
45
use std::path::Path;
56
use yaml_rust::{YamlLoader, Yaml};
67

@@ -29,15 +30,22 @@ impl Index {
2930
.as_hash()
3031
.ok_or(anyhow::anyhow!("Failed to load module index"))?
3132
{
33+
debug!("Processing index entry for {}", k.as_str().unwrap());
3234
let name = k.as_str().expect("Invalid key");
3335
let reference = if let Some(m) = v.as_hash() {
36+
let server = m[&Yaml::from_str("server")].as_str().expect("Expected 'server' key").to_string();
37+
let repo = m[&Yaml::from_str("repo")].as_str().expect("Expected 'repo' key").to_string();
38+
let path = m[&Yaml::from_str("path")].as_str().expect("Expected 'path' key").to_string();
39+
debug!("Artifactory source {},{},{}", server, repo, path);
3440
LocationInfo::Artifactory {
35-
server: m[&Yaml::from_str("server")].as_str().expect("Expected 'server' key").to_string(),
36-
repo: m[&Yaml::from_str("repo")].as_str().expect("Expected 'repo' key").to_string(),
37-
path: m[&Yaml::from_str("path")].as_str().expect("Expected 'path' key").to_string()
41+
server,
42+
repo,
43+
path
3844
}
3945
} else {
40-
LocationInfo::Git(v.as_str().expect("Expected a string value").to_string())
46+
let url = v.as_str().expect("Expected a string value").to_string();
47+
debug!("Git source {}", url);
48+
LocationInfo::Git(url)
4149
};
4250
data.insert(name.to_string(), reference);
4351
}

0 commit comments

Comments
 (0)