Filter file list as well
This commit is contained in:
33
kibot-ci.yml
33
kibot-ci.yml
@@ -36,7 +36,7 @@ image:
|
|||||||
get_files:
|
get_files:
|
||||||
- FILES=$(find . -name *$SEARCH -not -path "./.gitlab/*")
|
- FILES=$(find . -name *$SEARCH -not -path "./.gitlab/*")
|
||||||
get_dirs:
|
get_dirs:
|
||||||
- FILES=$(find . -name *$SEARCH -not -path "./.gitlab/*")
|
- !reference [.commands, get_files]
|
||||||
- |
|
- |
|
||||||
if [[ $FILES == "" ]]; then
|
if [[ $FILES == "" ]]; then
|
||||||
DIRS=""
|
DIRS=""
|
||||||
@@ -46,19 +46,28 @@ image:
|
|||||||
sch_from_pro:
|
sch_from_pro:
|
||||||
- 'SCHEMS=$(for f in $FILES ; do echo "${f%.*}.kicad_sch"; done)'
|
- 'SCHEMS=$(for f in $FILES ; do echo "${f%.*}.kicad_sch"; done)'
|
||||||
- 'SCHEMS=$(for f in $SCHEMS ; do echo "${f##**/}"; done)'
|
- 'SCHEMS=$(for f in $SCHEMS ; do echo "${f##**/}"; done)'
|
||||||
dir_arr:
|
get_dirs_filt:
|
||||||
- !reference [.commands, get_dirs]
|
- !reference [.commands, get_files]
|
||||||
- |
|
- |
|
||||||
FILTERED=$(echo "")
|
FILT_FILES=""
|
||||||
for d in $DIRS
|
FILT_DIRS=""
|
||||||
do
|
for f in $FILES
|
||||||
if [[ "$d" =~ ^[0-9]{4}-.*$ ]]
|
do
|
||||||
|
dir=$(dirname $f)
|
||||||
|
echo $dir
|
||||||
|
if [[ "$dir" =~ ^.?\/?[0-9]{4}-.*$ ]]
|
||||||
then
|
then
|
||||||
FILTERED=$(echo "$FILTERED $d")
|
FILT_FILES=$(echo "$FILT_FILES $f")
|
||||||
|
FILT_DIRS=$(echo "$FILT_DIRS $dir")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
END=$(echo $FILTERED | wc -w)
|
FILES=$FILT_FILES
|
||||||
dir_arr=($FILTERED)
|
DIRS=$FILT_DIRS
|
||||||
|
dir_arr:
|
||||||
|
- !reference [.commands, get_dirs_filt]
|
||||||
|
- |
|
||||||
|
END=$(echo $DIRS | wc -w)
|
||||||
|
dir_arr=($DIRS)
|
||||||
kibot:
|
kibot:
|
||||||
- 'SEARCH=".kicad_pro"'
|
- 'SEARCH=".kicad_pro"'
|
||||||
- !reference [.commands, dir_arr]
|
- !reference [.commands, dir_arr]
|
||||||
@@ -101,7 +110,7 @@ image:
|
|||||||
|
|
||||||
neo:
|
neo:
|
||||||
- 'SEARCH=".kicad_pro"'
|
- 'SEARCH=".kicad_pro"'
|
||||||
- !reference [.commands, get_dirs]
|
- !reference [.commands, get_dirs_filt]
|
||||||
- |
|
- |
|
||||||
for d in $DIRS
|
for d in $DIRS
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user