1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-04 02:28:03 +00:00

build: only format JS if files in web/ change (#5525)

In many cases the webui code is not updated for core libtransmission
changes and changes in the utils/clients. Therefore, check to see if any
web changes are made before running npm linting.

Co-authored-by: LaserEyess <LaserEyess@users.noreply.github.com>
This commit is contained in:
LaserEyess 2023-05-14 19:53:34 -04:00 committed by GitHub
parent 2cf9678737
commit 84f32d89c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,6 +76,8 @@ if [ -n "$fix" ]; then
fi
# format JS
# but only if js has changed
git diff --cached --quiet -- "web/**" && exit $exitcode
cd "${root}/web" || exit 1
npm_lint_args="$([ -n "$fix" ] && echo 'lint:fix' || echo 'lint')"
if ! npm ci --no-audit --no-fund --no-progress &>/dev/null; then