mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 10:28:32 +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:
@@ -76,6 +76,8 @@ if [ -n "$fix" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# format JS
|
# format JS
|
||||||
|
# but only if js has changed
|
||||||
|
git diff --cached --quiet -- "web/**" && exit $exitcode
|
||||||
cd "${root}/web" || exit 1
|
cd "${root}/web" || exit 1
|
||||||
npm_lint_args="$([ -n "$fix" ] && echo 'lint:fix' || echo 'lint')"
|
npm_lint_args="$([ -n "$fix" ] && echo 'lint:fix' || echo 'lint')"
|
||||||
if ! npm ci --no-audit --no-fund --no-progress &>/dev/null; then
|
if ! npm ci --no-audit --no-fund --no-progress &>/dev/null; then
|
||||||
|
|||||||
Reference in New Issue
Block a user