mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-07 21:25:08 +00:00
Update release script to match uv
(#11496)
See https://github.com/astral-sh/uv/pull/3764 --------- Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>
This commit is contained in:
parent
ee90017d3f
commit
c13c60bc47
5 changed files with 26 additions and 83 deletions
|
@ -333,7 +333,7 @@ even patch releases may contain [non-backwards-compatible changes](https://semve
|
||||||
### Creating a new release
|
### Creating a new release
|
||||||
|
|
||||||
1. Install `uv`: `curl -LsSf https://astral.sh/uv/install.sh | sh`
|
1. Install `uv`: `curl -LsSf https://astral.sh/uv/install.sh | sh`
|
||||||
1. Run `./scripts/release/bump.sh`; this command will:
|
1. Run `./scripts/release.sh`; this command will:
|
||||||
- Generate a temporary virtual environment with `rooster`
|
- Generate a temporary virtual environment with `rooster`
|
||||||
- Generate a changelog entry in `CHANGELOG.md`
|
- Generate a changelog entry in `CHANGELOG.md`
|
||||||
- Update versions in `pyproject.toml` and `Cargo.toml`
|
- Update versions in `pyproject.toml` and `Cargo.toml`
|
||||||
|
|
24
scripts/release.sh
Executable file
24
scripts/release.sh
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Prepare for a release
|
||||||
|
#
|
||||||
|
# All additional options are passed to `rooster release`
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
export UV_PREVIEW=1
|
||||||
|
|
||||||
|
script_root="$(realpath "$(dirname "$0")")"
|
||||||
|
project_root="$(dirname "$script_root")"
|
||||||
|
|
||||||
|
echo "Updating metadata with rooster..."
|
||||||
|
cd "$project_root"
|
||||||
|
uv tool run --from 'rooster-blue>=0.0.7' --python 3.12 --isolated -- \
|
||||||
|
rooster release "$@"
|
||||||
|
|
||||||
|
echo "Updating lockfile..."
|
||||||
|
cargo update -p ruff
|
||||||
|
|
||||||
|
echo "Generating contributors list..."
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
uv tool run --from 'rooster-blue>=0.0.7' --python 3.12 --isolated -- \
|
||||||
|
rooster contributors --quiet
|
|
@ -1,27 +1,3 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Prepare for a release
|
|
||||||
#
|
|
||||||
# All additional options are passed to `rooster`
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
script_root="$(realpath "$(dirname "$0")")"
|
echo 'This script has been removed, use `./scripts/release.sh` instead'
|
||||||
project_root="$(dirname "$(dirname "$script_root")")"
|
|
||||||
|
|
||||||
cd "$script_root"
|
|
||||||
echo "Setting up a temporary environment..."
|
|
||||||
uv venv
|
|
||||||
|
|
||||||
source ".venv/bin/activate"
|
|
||||||
uv pip install -r requirements.txt
|
|
||||||
|
|
||||||
echo "Updating metadata with rooster..."
|
|
||||||
cd "$project_root"
|
|
||||||
rooster release "$@"
|
|
||||||
|
|
||||||
echo "Updating lockfile..."
|
|
||||||
cargo check
|
|
||||||
|
|
||||||
echo "Generating contributors list..."
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
rooster contributors --quiet
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
rooster-blue
|
|
|
@ -1,56 +0,0 @@
|
||||||
# This file was autogenerated by uv v0.1.1 via the following command:
|
|
||||||
# uv pip compile scripts/release/requirements.in -o scripts/release/requirements.txt --upgrade
|
|
||||||
annotated-types==0.6.0
|
|
||||||
# via pydantic
|
|
||||||
anyio==4.3.0
|
|
||||||
# via httpx
|
|
||||||
certifi==2024.2.2
|
|
||||||
# via
|
|
||||||
# httpcore
|
|
||||||
# httpx
|
|
||||||
cffi==1.16.0
|
|
||||||
# via pygit2
|
|
||||||
click==8.1.7
|
|
||||||
# via typer
|
|
||||||
h11==0.14.0
|
|
||||||
# via httpcore
|
|
||||||
hishel==0.0.12
|
|
||||||
# via rooster-blue
|
|
||||||
httpcore==1.0.4
|
|
||||||
# via httpx
|
|
||||||
httpx==0.25.2
|
|
||||||
# via
|
|
||||||
# hishel
|
|
||||||
# rooster-blue
|
|
||||||
idna==3.6
|
|
||||||
# via
|
|
||||||
# anyio
|
|
||||||
# httpx
|
|
||||||
marko==2.0.3
|
|
||||||
# via rooster-blue
|
|
||||||
packaging==23.2
|
|
||||||
# via rooster-blue
|
|
||||||
pycparser==2.21
|
|
||||||
# via cffi
|
|
||||||
pydantic==2.6.1
|
|
||||||
# via rooster-blue
|
|
||||||
pydantic-core==2.16.2
|
|
||||||
# via pydantic
|
|
||||||
pygit2==1.14.1
|
|
||||||
# via rooster-blue
|
|
||||||
rooster-blue==0.0.2
|
|
||||||
setuptools==69.1.0
|
|
||||||
# via pygit2
|
|
||||||
sniffio==1.3.0
|
|
||||||
# via
|
|
||||||
# anyio
|
|
||||||
# httpx
|
|
||||||
tqdm==4.66.2
|
|
||||||
# via rooster-blue
|
|
||||||
typer==0.9.0
|
|
||||||
# via rooster-blue
|
|
||||||
typing-extensions==4.9.0
|
|
||||||
# via
|
|
||||||
# pydantic
|
|
||||||
# pydantic-core
|
|
||||||
# typer
|
|
Loading…
Add table
Add a link
Reference in a new issue