Skip to content

Commit

Permalink
Ignore aws-config/clippy.toml (smithy-lang#3489)
Browse files Browse the repository at this point in the history
## 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._
  • Loading branch information
rcoh authored Mar 14, 2024
1 parent 987024b commit b43c7ad
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions tools/ci-build/runtime-versioner/src/command/audit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}

Expand Down

0 comments on commit b43c7ad

Please sign in to comment.