Added verbosity option to the GitHub Action

Needs testing, related to #68
This commit is contained in:
Salvador E. Tropea 2021-04-12 12:44:28 -03:00
parent 2689ccbca2
commit 3a3e88ec83
2 changed files with 17 additions and 2 deletions

View File

@ -19,6 +19,10 @@ inputs:
required: false
# TODO: fix default 'first *.sch file found'
# default: '$(ls *.sch | head -n1)'
verbose:
description: 'Verbosity level [default: 0]'
required: false
default: '0'
runs:
using: 'docker'
image: 'Dockerfile'
@ -27,6 +31,7 @@ runs:
- -d ${{ inputs.dir }}
- -b ${{ inputs.board }}
- -e ${{ inputs.schema }}
- -v ${{ inputs.verbose }}
branding:
icon: 'cpu'
color: 'green'

View File

@ -121,8 +121,18 @@ function args_process {
-s | --skip) shift
SKIP="-s $1"
;;
-v | --verbose )
VERBOSE="-v"
-v | --verbose) shift
if [ "$1" == "0" ]; then
VERBOSE=""
elif [ "$1" == "1" ]; then
VERBOSE="-v"
elif [ "$1" == "2" ]; then
VERBOSE="-vv"
elif [ "$1" == "3" ]; then
VERBOSE="-vvv"
else
VERBOSE="-vvvv"
fi
;;
-h | --help )
help