Rust change detections should do inverse grep (#7564)
This commit is contained in:
parent
43358cc6bd
commit
9578df2abe
@ -2,8 +2,8 @@
|
|||||||
#ARGUMENT test for RUST, JS, COVERAGE or JS_RELEASE
|
#ARGUMENT test for RUST, JS, COVERAGE or JS_RELEASE
|
||||||
set -e # fail on any error
|
set -e # fail on any error
|
||||||
set -u # treat unset variables as error
|
set -u # treat unset variables as error
|
||||||
if [[ "$CI_BUILD_REF_NAME" = "beta" || "$CI_BUILD_REF_NAME" = "stable" ]]; then
|
if [[ "$CI_COMMIT_REF_NAME" = "beta" || "$CI_COMMIT_REF_NAME" = "stable" ]]; then
|
||||||
export GIT_COMPARE=$CI_BUILD_REF_NAME;
|
export GIT_COMPARE=$CI_COMMIT_REF_NAME;
|
||||||
else
|
else
|
||||||
export GIT_COMPARE=master;
|
export GIT_COMPARE=master;
|
||||||
fi
|
fi
|
||||||
@ -15,7 +15,7 @@ if [[ "$(git rev-parse $GIT_COMPARE)" == "$CI_COMMIT_SHA" ]]; then
|
|||||||
else
|
else
|
||||||
export JS_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep ^js/ | wc -l)"
|
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 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 -e ^js -e ^\\. -e ^LICENSE -e ^README.md -e ^test.sh -e ^windows/ -e ^scripts/ -e ^mac/ -e ^nsis/ | 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)"
|
||||||
fi
|
fi
|
||||||
TEST_SWITCH=$1
|
TEST_SWITCH=$1
|
||||||
rust_test () {
|
rust_test () {
|
||||||
|
Loading…
Reference in New Issue
Block a user