Files
codecov-action/entrypoint.sh
T

43 lines
1.2 KiB
Bash
Raw Normal View History

2019-08-06 14:02:11 -07:00
#!/bin/bash
set -eu
2019-08-07 12:42:49 -07:00
echo $INPUT_FLAGS
2019-08-06 18:02:35 -07:00
if [ $# -eq 0 ]
2019-08-07 11:39:29 -07:00
then
2019-08-07 12:42:49 -07:00
echo "inside zero"
2019-08-07 11:41:02 -07:00
bash <(curl -s https://codecov.io/bash)
2019-08-07 12:34:25 -07:00
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
then
2019-08-07 12:42:49 -07:00
echo "inside 3"
2019-08-07 12:34:25 -07:00
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE -F $INPUT_FLAGS
2019-08-07 11:44:00 -07:00
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ]
2019-08-07 11:39:29 -07:00
then
2019-08-07 12:42:49 -07:00
echo "inside token and file"
2019-08-07 11:39:29 -07:00
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE
2019-08-07 12:34:25 -07:00
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
then
2019-08-07 12:42:49 -07:00
echo "inside token and flags"
2019-08-07 12:34:25 -07:00
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -F $INPUT_FLAGS
elif [ "x$INPUT_FLAGS" != "x" ] && [ "x$INPUT_FILE" != "x" ]
then
2019-08-07 12:42:49 -07:00
echo "inside flags and file"
2019-08-07 12:34:25 -07:00
bash <(curl -s https://codecov.io/bash) -F $INPUT_FLAGS -f $INPUT_FILE
2019-08-07 11:44:00 -07:00
elif [ "x$INPUT_TOKEN" != "x" ]
2019-08-07 11:39:29 -07:00
then
2019-08-07 12:42:49 -07:00
echo "inside token"
2019-08-07 11:39:29 -07:00
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN
2019-08-07 11:44:00 -07:00
elif [ "x$INPUT_FILE" != "x" ]
2019-08-07 11:39:29 -07:00
then
2019-08-07 12:42:49 -07:00
echo "inside file"
2019-08-07 11:39:29 -07:00
bash <(curl -s https://codecov.io/bash) -f $INPUT_FILE
2019-08-07 12:34:25 -07:00
elif [ "x$INPUT_FLAGS" != "x" ]
then
2019-08-07 12:42:49 -07:00
echo "inside flags"
2019-08-07 12:34:25 -07:00
bash <(curl -s https://codecov.io/bash) -F $INPUT_FLAGS
2019-08-07 12:42:49 -07:00
else
exit 1
2019-08-06 17:19:19 -07:00
fi