Skip to content

Commit

Permalink
Merge branch 'master' into openocd-hex
Browse files Browse the repository at this point in the history
  • Loading branch information
mkj authored Aug 1, 2024
2 parents 13edbe8 + 679758e commit ded1b01
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name = "humility"
#
# Be sure to check in and push all of the files that change. Happy versioning!
#
version = "0.11.9"
version = "0.11.10"
authors = ["Bryan Cantrill <bryan@oxide.computer>"]
edition = "2018"
license = "MPL-2.0"
Expand Down
9 changes: 8 additions & 1 deletion cmd/rebootleby/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,20 @@ fn rebootleby(context: &mut ExecutionContext) -> Result<()> {
let mut zip =
ZipArchive::new(bundle_reader).context("opening bundle file as ZIP")?;

let img_bootleby = {
let img_bootleby = if zip.file_names().any(|x| x == "bootleby.bin") {
let mut entry = zip
.by_name("bootleby.bin")
.context("can't find bootleby.bin in bundle")?;
let mut data = vec![];
entry.read_to_end(&mut data).context("reading bootleby.bin")?;
data
} else {
let mut entry = zip
.by_name("img/final.bin")
.context("can't find bootleby.bin or img/final.bin in bundle")?;
let mut data = vec![];
entry.read_to_end(&mut data).context("reading bootleby.bin")?;
data
};
let img_cmpa = {
let mut entry =
Expand Down
4 changes: 2 additions & 2 deletions tests/cli_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fn make_tests(tests: &[Test], kind: Kind) -> Result<()> {

if let Some(f) = path.file_name() {
if let Some(s) = f.to_str() {
if let Some(name) = s.strip_prefix(&kind.prefix()) {
if let Some(name) = s.strip_prefix(kind.prefix()) {
input.push((name.to_string(), s.to_string()));
}
}
Expand Down Expand Up @@ -112,7 +112,7 @@ fn make_tests(tests: &[Test], kind: Kind) -> Result<()> {
let testcmd = if let Some(arg) = test.arg {
format!("{} {arg}", test.cmd)
} else {
format!("{}", test.cmd)
test.cmd.to_string()
};

writeln!(
Expand Down
4 changes: 2 additions & 2 deletions tests/cmd/chip.trycmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For more information try --help

```
$ humility --chip this-can-be-anything -V
humility 0.11.9
humility 0.11.10

```

Expand All @@ -28,7 +28,7 @@ For more information try --help

```
$ humility -c apx432 -V
humility 0.11.9
humility 0.11.10

```

4 changes: 2 additions & 2 deletions tests/cmd/version.trycmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Long version flag:

```
$ humility --version
humility 0.11.9
humility 0.11.10

```

Short version flag:

```
$ humility -V
humility 0.11.9
humility 0.11.10

```

0 comments on commit ded1b01

Please sign in to comment.