[GitHub Action] Added a mechanism to pass extra arguments
- Currently experimental Closes #320
This commit is contained in:
parent
13dbd72f5c
commit
090c594309
|
|
@ -47,6 +47,10 @@ inputs:
|
|||
description: 'Verbosity level [default: 0]'
|
||||
required: false
|
||||
default: '0'
|
||||
additional_args:
|
||||
description: 'Additional arguments to pass to KiBot'
|
||||
required: false
|
||||
default: ''
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: Dockerfile
|
||||
|
|
@ -55,12 +59,13 @@ runs:
|
|||
- -d ${{ inputs.dir }}
|
||||
- -b ${{ inputs.board }}
|
||||
- -e ${{ inputs.schema }}
|
||||
- -i ${{ inputs.install3D }}
|
||||
- -q ${{ inputs.quickstart }}
|
||||
- -s ${{ inputs.skip }}
|
||||
- -t ${{ inputs.targets }}
|
||||
- -v ${{ inputs.verbose }}
|
||||
- -V ${{ inputs.variant }}
|
||||
- -i ${{ inputs.install3D }}
|
||||
- -x ${{ additional_args }}
|
||||
branding:
|
||||
icon: 'cpu'
|
||||
color: 'green'
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ VARIANT=""
|
|||
TARGETS=""
|
||||
QUICKSTART="NO"
|
||||
INSTALL3D="NO"
|
||||
EXTRA_ARGS=""
|
||||
|
||||
# Exit error code
|
||||
EXIT_ERROR=1
|
||||
|
|
@ -41,11 +42,12 @@ function msg_help {
|
|||
echo -e " '-d DIR' output path. Default: current dir, will be used as prefix of dir configured in config file"
|
||||
echo -e " '-b FILE' .kicad_pcb board file. Use __SCAN__ to get the first board file found in current folder."
|
||||
echo -e " '-e FILE' .sch schematic file. Use __SCAN__ to get the first schematic file found in current folder."
|
||||
echo -e " '-i YES' install the 3D models."
|
||||
echo -e " '-q YES' generate configs and outputs automagically (-b, -e, -s, -V, -c are ignored)."
|
||||
echo -e " '-s PRES' skip preflights, comma separated or 'all'"
|
||||
echo -e " '-t TARGETS' list of targets to generate separated by spaces. To only run preflights use __NONE__."
|
||||
echo -e " '-V VARIANT' global variant"
|
||||
echo -e " '-i YES' install the 3D models."
|
||||
echo -e " '-x EXTRA_ARGS' extra arguments to concatenate"
|
||||
|
||||
echo -e "\nMiscellaneous:"
|
||||
echo -e " '-v LEVEL' annotate program execution"
|
||||
|
|
@ -145,6 +147,8 @@ function args_process {
|
|||
VERBOSE="-vvvv"
|
||||
fi
|
||||
;;
|
||||
-x) EXTRA_ARGS="$VAL"
|
||||
;;
|
||||
-h) help
|
||||
exit
|
||||
;;
|
||||
|
|
@ -169,8 +173,8 @@ function run {
|
|||
echo Quick-start options: $VERBOSE --quick-start
|
||||
/bin/bash -c "kibot $VERBOSE --quick-start"
|
||||
else
|
||||
echo Options: $CONFIG $DIR $BOARD $SCHEMA $SKIP $VERBOSE $VARIANT $TARGETS
|
||||
/bin/bash -c "kibot $CONFIG $DIR $BOARD $SCHEMA $SKIP $VERBOSE $VARIANT $TARGETS"
|
||||
echo Options: $CONFIG $DIR $BOARD $SCHEMA $SKIP $VERBOSE $VARIANT $TARGETS $EXTRA_ARGS
|
||||
/bin/bash -c "kibot $CONFIG $DIR $BOARD $SCHEMA $SKIP $VERBOSE $VARIANT $TARGETS $EXTRA_ARGS"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue