Skip to content

Commit

Permalink
chore: use latest yardstick (#1438)
Browse files Browse the repository at this point in the history
Include changes to gate.py to correctly guess that local builds of grype
are considered the changed version, not the latest release.

Signed-off-by: Will Murphy <[email protected]>
  • Loading branch information
willmurphyscode authored Aug 16, 2023
1 parent 94d58fb commit 1c084c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions test/quality/.yardstick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ result-sets:

- name: grype
version: git:current-commit
# for local build of grype, use for example:
# version: path:../../
takes: SBOM

- name: grype
Expand Down
9 changes: 8 additions & 1 deletion test/quality/gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ def guess_tool_orientation(tools: list[str]):
continue
current_tool = tool

if latest_release_tool is None:
for tool in tools:
if "@path:" in tool:
current_tool = tool
continue
latest_release_tool = tool

if latest_release_tool is None:
# "latest" value isn't accessible, so we do a best guess at which version is latest
latest_release_tool, current_tool = sorted(tools)
Expand Down Expand Up @@ -334,4 +341,4 @@ def setup_logging(verbosity: int):
)

if __name__ == '__main__':
main()
main()
2 changes: 1 addition & 1 deletion test/quality/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
git+https://github.com/anchore/yardstick@v0.7.0
git+https://github.com/anchore/yardstick@v0.8.0
# ../../../yardstick
tabulate==0.9.0

0 comments on commit 1c084c4

Please sign in to comment.