From 02e1497349377af132d987bad9980299af45201b Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Tue, 27 Feb 2024 12:59:56 -0800 Subject: Move ci from format-code to run-ci Format code is supposed to do just that... format code. npm ci is doing much more than that, so it belongs in run-ci. Change-Id: I4c4e94f1a53e04aa13289aea259098143377cc2c Signed-off-by: Ed Tanous --- format-code.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'format-code.sh') diff --git a/format-code.sh b/format-code.sh index 9649a403..b93ca626 100755 --- a/format-code.sh +++ b/format-code.sh @@ -14,6 +14,11 @@ if [ -n "$1" ]; then cd "$1" fi -npm ci +npm install npm run lint + +# CI might be running a different version of NPM than yocto, and we don't +# want to trigger a formatting failure if package-lock.json has changed +# Therefore, revert it back to what it was previously. +git checkout package-lock.json git --no-pager diff --exit-code -- cgit v1.2.3