mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-14 06:57:26 +00:00
correct logic for token requirement
This commit is contained in:
parent
c7a04fdde5
commit
bd3230c275
1 changed files with 3 additions and 23 deletions
|
|
@ -7,7 +7,8 @@ set -eu
|
||||||
|
|
||||||
if [ $# -eq 0 ]
|
if [ $# -eq 0 ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash)
|
echo "Please provide an upload token"
|
||||||
|
exit 1
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_FLAGS" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_FLAGS" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE -F $INPUT_FLAGS -n $INPUT_NAME
|
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE -F $INPUT_FLAGS -n $INPUT_NAME
|
||||||
|
|
@ -20,40 +21,19 @@ then
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_NAME" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_NAME" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -n $INPUT_NAME -F $INPUT_FLAGS
|
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -n $INPUT_NAME -F $INPUT_FLAGS
|
||||||
elif [ "x$INPUT_NAME" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
|
||||||
then
|
|
||||||
bash <(curl -s https://codecov.io/bash) -n $INPUT_NAME -f $INPUT_FILE -F $INPUT_FLAGS
|
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ]
|
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE
|
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -F $INPUT_FLAGS
|
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -F $INPUT_FLAGS
|
||||||
elif [ "x$INPUT_FLAGS" != "x" ] && [ "x$INPUT_FILE" != "x" ]
|
|
||||||
then
|
|
||||||
bash <(curl -s https://codecov.io/bash) -F $INPUT_FLAGS -f $INPUT_FILE
|
|
||||||
elif [ "x$INPUT_FLAGS" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
|
||||||
then
|
|
||||||
bash <(curl -s https://codecov.io/bash) -F $INPUT_FLAGS -n $INPUT_NAME
|
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -n $INPUT_NAME
|
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -n $INPUT_NAME
|
||||||
elif [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
|
||||||
then
|
|
||||||
bash <(curl -s https://codecov.io/bash) -f $INPUT_FILE -n $INPUT_NAME
|
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ]
|
elif [ "x$INPUT_TOKEN" != "x" ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN
|
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN
|
||||||
elif [ "x$INPUT_FILE" != "x" ]
|
|
||||||
then
|
|
||||||
bash <(curl -s https://codecov.io/bash) -f $INPUT_FILE
|
|
||||||
elif [ "x$INPUT_FLAGS" != "x" ]
|
|
||||||
then
|
|
||||||
bash <(curl -s https://codecov.io/bash) -F $INPUT_FLAGS
|
|
||||||
elif [ "x$INPUT_NAME" != "x" ]
|
|
||||||
then
|
|
||||||
bash <(curl -s https://codecov.io/bash) -n $INPUT_NAME
|
|
||||||
else
|
else
|
||||||
echo "Please provide valid arguments"
|
echo "Please provide an upload token and valid arguments"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue