Skip to content

Commit

Permalink
fix: ruff 0.5.0 windows release doesn't nest a folder (#318)
Browse files Browse the repository at this point in the history
Fixes #317
  • Loading branch information
alexeagle authored Jul 8, 2024
1 parent 164fac2 commit 369cdb2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lint/ruff.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ def fetch_ruff(tag):
fetch_rule = ruff_workaround_20269
is_windows = plat.endswith("windows-msvc")

# Account for ruff packaging change in 0.5.0
strip_prefix = None
if versions.is_at_least("0.5.0", version) and not is_windows:
strip_prefix = "ruff-" + plat

maybe(
fetch_rule,
name = "ruff_" + plat,
Expand All @@ -262,7 +267,7 @@ def fetch_ruff(tag):
version = version,
ext = "zip" if is_windows else "tar.gz",
),
strip_prefix = "ruff-" + plat if versions.is_at_least("0.5.0", version) else None,
strip_prefix = strip_prefix,
sha256 = sha256,
build_file_content = """exports_files(["ruff", "ruff.exe"])""",
)

0 comments on commit 369cdb2

Please sign in to comment.