From d422f6b4fd040ee7a3c4bb4a4f4688f3d5a5f1ab Mon Sep 17 00:00:00 2001 From: Andrey Platov Date: Sat, 11 Sep 2021 09:19:59 +0200 Subject: [PATCH] add svelte-check to workflow Signed-off-by: Andrey Platov --- .github/workflows/main.yml | 3 +++ common/scripts/each.sh | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100755 common/scripts/each.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 91d8b9fcd5..e4ebdf6b56 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/common/scripts/each.sh b/common/scripts/each.sh new file mode 100755 index 0000000000..cc0f2c9df0 --- /dev/null +++ b/common/scripts/each.sh @@ -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