Skip to content

Commit 9f0a6ff

Browse files
Merge #123
123: Prepare v0.3.6 & bump deps r=burrbull a=Emilgardis Bump deps and prepare for release Fixes #122 Co-authored-by: Emil Gardström <[email protected]>
2 parents 2712633 + 0ac6347 commit 9f0a6ff

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
## [v0.3.6] - 2022-06-19
11+
1012
### Added
1113

1214
- Action to build binaries and release for every version tag and latest commit
1315

16+
### Changed
17+
18+
- Bump `cargo_metadata` to 0.14 and `rustc_version` to 0.4
19+
1420
## [v0.3.5] - 2022-02-12
1521

1622
### Added
@@ -183,7 +189,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
183189

184190
Initial release
185191

186-
[Unreleased]: https://github.com/rust-embedded/cargo-binutils/compare/v0.3.5...HEAD
192+
[Unreleased]: https://github.com/rust-embedded/cargo-binutils/compare/v0.3.6...HEAD
193+
[v0.3.6]: https://github.com/rust-embedded/cargo-binutils/compare/v0.3.5...v0.3.6
187194
[v0.3.5]: https://github.com/rust-embedded/cargo-binutils/compare/v0.3.4...v0.3.5
188195
[v0.3.4]: https://github.com/rust-embedded/cargo-binutils/compare/v0.3.3...v0.3.4
189196
[v0.3.3]: https://github.com/rust-embedded/cargo-binutils/compare/v0.3.2...v0.3.3

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ repository = "https://github.com/rust-embedded/cargo-binutils/"
1515
version = "0.3.5"
1616

1717
[dependencies]
18-
cargo_metadata = "0.11"
18+
cargo_metadata = "0.14"
1919
clap = "2.33"
2020
regex = "1.5.5"
2121
rustc-cfg = "0.4"
2222
rustc-demangle = "0.1"
23-
rustc_version = "0.2"
23+
rustc_version = "0.4"
2424
serde = "1.0"
2525
toml = "0.5"
2626
anyhow = "1.0"

src/lib.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#![deny(warnings)]
22

33
use std::io::{self, BufReader, Write};
4-
use std::path::{Component, Path};
4+
use std::path::Path;
55
use std::process::{Command, Stdio};
66
use std::{env, str};
77

88
use anyhow::{bail, Result};
9+
use cargo_metadata::camino::Utf8Component;
910
use cargo_metadata::{Artifact, CargoOpt, Message, Metadata, MetadataCommand};
1011
use clap::{App, AppSettings, Arg, ArgMatches};
1112
use rustc_cfg::Cfg;
@@ -56,8 +57,8 @@ impl Context {
5657

5758
// Should always succeed.
5859
let target_path = artifact.filenames[0].strip_prefix(metadata.target_directory)?;
59-
let target_name = if let Some(Component::Normal(path)) = target_path.components().next() {
60-
let path = path.to_string_lossy();
60+
let target_name = if let Some(Utf8Component::Normal(path)) = target_path.components().next()
61+
{
6162
// TODO: How will custom profiles impact this?
6263
if path == "debug" || path == "release" {
6364
// Looks like this artifact was built for the host.
@@ -82,7 +83,7 @@ impl Context {
8283
let mut config_target_name = None;
8384
let config: toml::Value;
8485

85-
if let Some(path) = search(&metadata.workspace_root, ".cargo/config") {
86+
if let Some(path) = search(metadata.workspace_root.as_std_path(), ".cargo/config") {
8687
config = parse(&path.join(".cargo/config"))?;
8788
config_target_name = config
8889
.get("build")

0 commit comments

Comments
 (0)