add svelte-check to workflow

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-09-11 09:19:59 +02:00
parent 95ae04391f
commit d422f6b4fd
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0
2 changed files with 39 additions and 0 deletions

View File

@ -38,3 +38,6 @@ jobs:
- name: Building...
run: node common/scripts/install-run-rush.js rebuild --verbose
- name: Checking svelte sources...
run: common/scripts/each.sh svelte-check

36
common/scripts/each.sh Executable file
View File

@ -0,0 +1,36 @@
#!/bin/bash
#
# Copyright © 2020 Anticrm Platform Contributors.
#
# Licensed under the Eclipse Public License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may
# obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -e
sourceDir=$(dirname "$0")
sourceDir=$(realpath "$sourceDir")
runScript=$sourceDir/install-run-rushx.js
roots=$(node $sourceDir/install-run-rush.js list -f --json | grep "fullPath" | cut -f 2 -d ':' | cut -f 2 -d '"')
for i in $roots
do
pushd ${i}
node ${runScript} $@
retVal=$?
if [ $retVal -ne 0 ]; then
echo "Error"
exit $retVal
fi
popd
done