mirror of
https://github.com/penpot/penpot.git
synced 2026-11-10 20:10:37 +00:00
* 🔧 Bump Rust version of the devenv image to 1.99 * 🔧 Run the pinned Rust setup from the lint and format scripts ./build and ./test switch to the Rust version in render-wasm/_build_env through setup, but ./lint did not, and formatting called cargo fmt directly. In CI both ran on the devenv image's default toolchain. Make ./lint run setup and add a ./fmt script that does the same, so all render-wasm entry points use the pinned version. CI and scripts/ci now call ./fmt instead of cargo fmt. AI-assisted-by: claude-opus-5-5
19 lines
373 B
Bash
Executable File
19 lines
373 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Usage: ./fmt [--check] [extra cargo fmt params...]
|
|
#
|
|
# Formats the crate with the Rust toolchain pinned in `_build_env`. Set
|
|
# PENPOT_WASM_PREPARED=1 to skip the toolchain setup.
|
|
|
|
set -e
|
|
|
|
_SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
|
|
pushd "$_SCRIPT_DIR" > /dev/null
|
|
|
|
. ./_build_env frontend
|
|
|
|
setup
|
|
cargo fmt "$@"
|
|
|
|
popd > /dev/null
|