Skip to content

Commit ece2f37

Browse files
committed
Update dependencies
1 parent 62bd282 commit ece2f37

File tree

4 files changed

+54
-37
lines changed

4 files changed

+54
-37
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
## [0.14.4] - 2021-07-20
10+
11+
### Fixed
12+
13+
- Prefer custom refspec
14+
15+
### Changed
16+
17+
- Update dependencies
18+
919
## [0.14.3] - 2021-06-24
1020

1121
### Fixed

Cargo.lock

Lines changed: 29 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "git-mirror"
3-
version = "0.14.3"
3+
version = "0.14.4"
44
authors = ["Pascal Bach <[email protected]>"]
55
description = "Sync between different git repositories."
66
license = "MIT"
@@ -25,7 +25,7 @@ fs2 = "0.4"
2525
prometheus = "0.12"
2626
reqwest = {version = "0.11", features = ["native-tls-vendored", "blocking"] }
2727
openssl-probe = "0.1"
28-
junit-report = "0.5"
28+
junit-report = "0.6"
2929
structopt = "0.3"
3030

3131
[profile.release]

src/lib.rs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ use rayon::iter::{IndexedParallelIterator, IntoParallelRefIterator, ParallelIter
2828
// Time handling
2929
use chrono::{Local, Utc};
3030

31-
use junit_report::{DateTime, Report, TestCase, TestSuite};
31+
use junit_report::{
32+
DateTime, ReportBuilder, TestCase, TestCaseBuilder, TestSuite, TestSuiteBuilder,
33+
};
3234

3335
// Monitoring;
3436
use prometheus::register_gauge_vec;
@@ -159,7 +161,7 @@ fn run_sync_task(v: &[MirrorResult], label: &str, opts: &MirrorOptions) -> TestS
159161
.with_label_values(&[&x.origin, &x.destination, &label])
160162
.set(Utc::now().timestamp() as f64);
161163
proj_ok.with_label_values(&[&label]).inc();
162-
TestCase::success(&name, Utc::now() - start)
164+
TestCaseBuilder::success(&name, Utc::now() - start).build()
163165
}
164166
Err(e) => {
165167
println!(
@@ -175,12 +177,13 @@ fn run_sync_task(v: &[MirrorResult], label: &str, opts: &MirrorOptions) -> TestS
175177
.set(Utc::now().timestamp() as f64);
176178
proj_fail.with_label_values(&[&label]).inc();
177179
error!("Unable to sync repo {} ({})", name, e);
178-
TestCase::error(
180+
TestCaseBuilder::error(
179181
&name,
180182
Utc::now() - start,
181183
"sync error",
182184
&format!("{:?}", e),
183185
)
186+
.build()
184187
}
185188
}
186189
}
@@ -191,11 +194,12 @@ fn run_sync_task(v: &[MirrorResult], label: &str, opts: &MirrorOptions) -> TestS
191194
match e {
192195
MirrorError::Description(d, se) => {
193196
error!("Error parsing YAML: {}, Error: {:?}", d, se);
194-
TestCase::error("", duration, "parse error", &format!("{:?}", e))
197+
TestCaseBuilder::error("", duration, "parse error", &format!("{:?}", e))
198+
.build()
195199
}
196200
MirrorError::Skip(url) => {
197201
println!("SKIP {}/{} [{}]: {}", i, total, Local::now(), url);
198-
TestCase::skipped(url)
202+
TestCaseBuilder::skipped(url).build()
199203
}
200204
}
201205
}
@@ -204,8 +208,9 @@ fn run_sync_task(v: &[MirrorResult], label: &str, opts: &MirrorOptions) -> TestS
204208
.collect::<Vec<TestCase>>();
205209

206210
let success = results.iter().filter(|ref x| x.is_success()).count();
207-
let ts = TestSuite::new("Sync Job");
208-
let ts = ts.add_testcases(results);
211+
let ts = TestSuiteBuilder::new("Sync Job")
212+
.add_testcases(results)
213+
.build();
209214
println!("DONE [{2}]: {0}/{1}", success, total, Local::now());
210215
ts
211216
}
@@ -294,7 +299,7 @@ fn write_metrics(f: &Path) {
294299
}
295300

296301
fn write_junit_report(f: &Path, ts: TestSuite) {
297-
let report = Report::default().add_testsuite(ts);
302+
let report = ReportBuilder::default().add_testsuite(ts).build();
298303
let mut file = File::create(f).unwrap();
299304
report.write_xml(&mut file).unwrap();
300305
}

0 commit comments

Comments
 (0)