diff --git a/projects/astral.sh/ruff/package.yml b/projects/astral.sh/ruff/package.yml index 13081840..25a358ee 100644 --- a/projects/astral.sh/ruff/package.yml +++ b/projects/astral.sh/ruff/package.yml @@ -1,5 +1,5 @@ distributable: - url: https://github.com/astral-sh/ruff/archive/refs/tags/v{{version}}.tar.gz + url: https://github.com/astral-sh/ruff/archive/refs/tags/{{ version.tag }}.tar.gz strip-components: 1 versions: @@ -30,8 +30,14 @@ test: # Cause: No such file or directory (os error 2) - run: mkdir -p .ruff_cache/{{version}} if: '>=0.1.12' - - ruff -e $FIXTURE | grep "\`os\` imported but unused" - - ruff --fix $FIXTURE + - run: + - ruff -e $FIXTURE | grep "\`os\` imported but unused" + - ruff --fix $FIXTURE + if: <0.5 + - run: + - (ruff check $FIXTURE || true) | grep "\`os\` imported but unused" + - ruff check --fix $FIXTURE + if: '>=0.5' - test ! -s $FIXTURE fixture: | import os diff --git a/projects/github.com/charliermarsh/ruff/package.yml b/projects/github.com/charliermarsh/ruff/package.yml index cbc1e0fc..d4dd04ab 100644 --- a/projects/github.com/charliermarsh/ruff/package.yml +++ b/projects/github.com/charliermarsh/ruff/package.yml @@ -1,5 +1,5 @@ distributable: - url: https://github.com/astral-sh/ruff/archive/refs/tags/v{{version}}.tar.gz + url: https://github.com/astral-sh/ruff/archive/refs/tags/{{ version.tag }}.tar.gz strip-components: 1 versions: @@ -30,12 +30,18 @@ test: script: # v0.1.12 introduced this test error: # ruff failed - # Cause: Failed to create cache file '/__w/pantry/pantry/testbeds/github.com__charliermarsh__ruff-0.1.12/.ruff_cache/0.1.12/10391082687706843805' + # Cause: Failed to create cache file '/__w/pantry/pantry/testbeds/astral.sh__ruff-0.1.12/.ruff_cache/0.1.12/10391082687706843805' # Cause: No such file or directory (os error 2) - run: mkdir -p .ruff_cache/{{version}} if: '>=0.1.12' - - ruff -e $FIXTURE | grep "\`os\` imported but unused" - - ruff --fix $FIXTURE + - run: + - ruff -e $FIXTURE | grep "\`os\` imported but unused" + - ruff --fix $FIXTURE + if: <0.5 + - run: + - (ruff check $FIXTURE || true) | grep "\`os\` imported but unused" + - ruff check --fix $FIXTURE + if: '>=0.5' - test ! -s $FIXTURE fixture: | import os