Skip to content

Commit b43c7ad

Browse files
authored
Ignore aws-config/clippy.toml (#3489)
## Motivation and Context Fix CI breakage during release. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
1 parent 987024b commit b43c7ad

File tree

1 file changed

+16
-7
lines changed
  • tools/ci-build/runtime-versioner/src/command

1 file changed

+16
-7
lines changed

tools/ci-build/runtime-versioner/src/command/audit.rs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,23 @@ impl RuntimeCrate {
114114
/// True if this runtime crate changed since the given release tag.
115115
fn changed_since_release(&self, repo: &Repo, release_tag: &ReleaseTag) -> Result<bool> {
116116
let status = repo
117-
.git(["diff", "--quiet", release_tag.as_str(), self.path.as_str()])
118-
.status()
117+
.git([
118+
"diff",
119+
"--name-only",
120+
release_tag.as_str(),
121+
self.path.as_str(),
122+
])
123+
.output()
119124
.with_context(|| format!("failed to git diff {}", self.name))?;
120-
match status.code() {
121-
Some(0) => Ok(false),
122-
Some(1) => Ok(true),
123-
code => bail!("unknown git diff result: {code:?}"),
124-
}
125+
let output = String::from_utf8(status.stdout)?;
126+
let changed_files = output
127+
.lines()
128+
// When run during a release, this file is replaced with it's actual contents.
129+
// This breaks this git-based comparison and incorrectly requires a version bump.
130+
// Temporary fix to allow the build to succeed.
131+
.filter(|line| !line.contains("aws-config/clippy.toml"))
132+
.collect::<Vec<_>>();
133+
Ok(!changed_files.is_empty())
125134
}
126135
}
127136

0 commit comments

Comments
 (0)