Skip to content
Snippets Groups Projects
Commit 9ce95387 authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

Use UPSTREAM variable in check/apply script

parent ad47383a
No related branches found
No related tags found
1 merge request!175Clang format scripts as in MR
...@@ -28,7 +28,7 @@ if [ -z $UPSTREAM ]; then ...@@ -28,7 +28,7 @@ if [ -z $UPSTREAM ]; then
fi fi
echo "Upstream name is :" $UPSTREAM echo "Upstream name is :" $UPSTREAM
BASE_COMMIT=upstream/master BASE_COMMIT=$UPSTREAM/master
CHANGED_FILES=$(git diff --name-only $BASE_COMMIT | grep -E '.*\.(h|hpp|c|C|cpp|cxx|tpl)$' | grep -viE '.*LinkDef.h$') CHANGED_FILES=$(git diff --name-only $BASE_COMMIT | grep -E '.*\.(h|hpp|c|C|cpp|cxx|tpl)$' | grep -viE '.*LinkDef.h$')
if [[ $# -ne 1 ]]; then if [[ $# -ne 1 ]]; then
...@@ -41,6 +41,7 @@ fi ...@@ -41,6 +41,7 @@ fi
case $1 in case $1 in
check) check)
echo "Checking if there are format changes required" echo "Checking if there are format changes required"
git fetch $UPSTREAM
$GIT_CLANG_FORMAT_BIN --commit $BASE_COMMIT --diff $CHANGED_FILES --extensions h,hpp,c,C,cpp,cxx,tpl $GIT_CLANG_FORMAT_BIN --commit $BASE_COMMIT --diff $CHANGED_FILES --extensions h,hpp,c,C,cpp,cxx,tpl
;; ;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment