From 50a58e1ae8c605bda73ac30b5d2abf80b78ae51c Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Tue, 23 Jan 2018 14:55:02 +0300 Subject: [PATCH] fix conditions in gitlab-test (#7676) * fix conditions in gitlab-test * Update gitlab-test.sh --- scripts/gitlab-test.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/gitlab-test.sh b/scripts/gitlab-test.sh index 1d7e18806..4c1eb9177 100755 --- a/scripts/gitlab-test.sh +++ b/scripts/gitlab-test.sh @@ -3,17 +3,15 @@ set -e # fail on any error set -u # treat unset variables as error -export JS_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep ^js/ | wc -l)" -export JS_OLD_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep ^js-old/ | wc -l)" -export RUST_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep -v -e ^js -e ^\\. -e ^LICENSE -e ^README.md -e ^test.sh -e ^windows/ -e ^scripts/ -e ^mac/ -e ^nsis/ | wc -l)" -echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED" -echo "JS_FILES_MODIFIED: $JS_FILES_MODIFIED" -echo "JS_OLD_FILES_MODIFIED: $JS_OLD_FILES_MODIFIED" if [[ "$CI_COMMIT_REF_NAME" = "beta" || "$CI_COMMIT_REF_NAME" = "stable" ]]; then export GIT_COMPARE=$CI_COMMIT_REF_NAME; else export GIT_COMPARE=master; fi +export JS_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep ^js/ | wc -l)" +export JS_OLD_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep ^js-old/ | wc -l)" +export RUST_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep -v -e ^js -e ^\\. -e ^LICENSE -e ^README.md -e ^test.sh -e ^windows/ -e ^scripts/ -e ^mac/ -e ^nsis/ | wc -l)" + echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED" echo "JS_FILES_MODIFIED: $JS_FILES_MODIFIED" echo "JS_OLD_FILES_MODIFIED: $JS_OLD_FILES_MODIFIED"