mirror of
https://github.com/penpot/penpot.git
synced 2025-06-18 01:01:40 +02:00
39 lines
909 B
Bash
Executable file
39 lines
909 B
Bash
Executable file
#!/usr/bin/env bash
|
|
_SCRIPT_DIR=$(dirname $0);
|
|
|
|
pushd $_SCRIPT_DIR;
|
|
|
|
# Enable debugging if the script is run with --debug
|
|
if [[ "$1" == "--debug" ]]; then
|
|
set -x
|
|
fi
|
|
|
|
. ./_build_env
|
|
|
|
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"wasm32-unknown-emscripten"};
|
|
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.86.0-1/skia-binaries-cab569e6478958ca0783-wasm32-unknown-emscripten-gl-svg-textlayout-binary-cache-webp.tar.gz"}
|
|
|
|
|
|
ALLOWED_RULES="-D static_mut_refs"
|
|
|
|
# ./lint --fix
|
|
if [[ "$1" == "--fix" ]]; then
|
|
cargo clippy \
|
|
--fix --allow-dirty \
|
|
--target=wasm32-unknown-emscripten \
|
|
--all-targets \
|
|
-- -D warnings \
|
|
$ALLOWED_RULES
|
|
else
|
|
cargo clippy \
|
|
--target=wasm32-unknown-emscripten \
|
|
--all-targets \
|
|
-- -D warnings \
|
|
$ALLOWED_RULES
|
|
fi
|
|
|
|
RESULT=$?
|
|
|
|
popd
|
|
|
|
exit $RESULT
|