rename(ruff)

closes #4531
This commit is contained in:
Jacob Heider 2023-12-23 19:02:45 -05:00 committed by Jacob Heider
parent b5834b1e6f
commit 8409af5069
2 changed files with 35 additions and 4 deletions

View file

@ -0,0 +1,29 @@
distributable:
url: https://github.com/astral-sh/ruff/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
versions:
github: charliermarsh/ruff
strip: /^v /
build:
dependencies:
rust-lang.org: '>=1.60'
rust-lang.org/cargo: '*'
script:
- run: CRATE=ruff_cli
if: <0.0.242
- run: CRATE=crates/ruff_cli
if: '>=0.0.242'
- cargo install --locked --path $CRATE --root {{prefix}}
provides:
- bin/ruff
test:
script:
- ruff -e $FIXTURE | grep "\`os\` imported but unused"
- ruff --fix $FIXTURE
- test ! -s $FIXTURE
fixture: |
import os

View file

@ -1,9 +1,9 @@
distributable: distributable:
url: https://github.com/charliermarsh/ruff/archive/refs/tags/v{{version}}.tar.gz url: https://github.com/astral-sh/ruff/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1 strip-components: 1
versions: versions:
github: charliermarsh/ruff github: astral-sh/ruff
strip: /^v / strip: /^v /
build: build:
@ -19,8 +19,10 @@ build:
fi fi
cargo install --locked --path $CRATE --root {{prefix}} cargo install --locked --path $CRATE --root {{prefix}}
provides: renamed-to: astral.sh/ruff
- bin/ruff
# provides:
# - bin/ruff
test: test:
script: | script: |