Skip to content

Commit c896a5f

Browse files
committed
fix(workflows): specify package name for workspace build
Use -p linguist_to_snapshot instead of --bin to properly build workspace member binaries.
1 parent 276de59 commit c896a5f

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/publish-snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- name: Build linguist_to_snapshot
2525
run: |
26-
cargo build --release --bin linguist_to_snapshot
26+
cargo build --release -p linguist_to_snapshot
2727
2828
- name: Generate canonical snapshot and open PR
2929
env:

.github/workflows/validate-snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
- name: Build linguist_to_snapshot tool
2121
run: |
22-
cargo build --release --bin linguist_to_snapshot
22+
cargo build --release -p linguist_to_snapshot
2323
2424
- name: Generate snapshot from PR-provided linguist (if present)
2525
run: |

tools/linguist_sync.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ impl StringList {
9696
}
9797

9898
#[derive(Debug, Deserialize)]
99-
#[allow(clippy::struct_field_names, reason = "Field names match Linguist's schema")]
99+
#[allow(
100+
clippy::struct_field_names,
101+
reason = "Field names match Linguist's schema"
102+
)]
100103
struct Language {
101104
#[serde(rename = "type")]
102105
language_type: String,
@@ -755,7 +758,10 @@ fn write_to_file(path: &Path, contents: &str) -> Result<()> {
755758
///
756759
/// Panics only if `StringList` encounters an unexpected variant (which should be
757760
/// impossible with the current serde definitions).
758-
#[allow(clippy::too_many_lines, reason = "Main function orchestrates multiple sync phases")]
761+
#[allow(
762+
clippy::too_many_lines,
763+
reason = "Main function orchestrates multiple sync phases"
764+
)]
759765
#[tokio::main]
760766
async fn main() -> Result<()> {
761767
if env_logger::builder()

0 commit comments

Comments
 (0)