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._
This commit is contained in:
Russell Cohen 2024-03-13 21:36:25 -04:00 committed by GitHub
parent 987024bfef
commit b43c7ad2e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 7 deletions

View File

@ -114,14 +114,23 @@ impl RuntimeCrate {
/// True if this runtime crate changed since the given release tag.
fn changed_since_release(&self, repo: &Repo, release_tag: &ReleaseTag) -> Result<bool> {
let status = repo
.git(["diff", "--quiet", release_tag.as_str(), self.path.as_str()])
.status()
.git([
"diff",
"--name-only",
release_tag.as_str(),
self.path.as_str(),
])
.output()
.with_context(|| format!("failed to git diff {}", self.name))?;
match status.code() {
Some(0) => Ok(false),
Some(1) => Ok(true),
code => bail!("unknown git diff result: {code:?}"),
}
let output = String::from_utf8(status.stdout)?;
let changed_files = output
.lines()
// When run during a release, this file is replaced with it's actual contents.
// This breaks this git-based comparison and incorrectly requires a version bump.
// Temporary fix to allow the build to succeed.
.filter(|line| !line.contains("aws-config/clippy.toml"))
.collect::<Vec<_>>();
Ok(!changed_files.is_empty())
}
}