From db5a766c555ab884290a335b2c0e3bf5cb0c2ce7 Mon Sep 17 00:00:00 2001 From: Thomas Hu Date: Thu, 8 Aug 2019 01:39:13 -0400 Subject: [PATCH] Remove options without a provided token Remove options without a token --- entrypoint.sh | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index b756f31..8dc7a45 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -20,40 +20,19 @@ then elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_NAME" != "x" ] && [ "x$INPUT_FLAGS" != "x" ] then 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" ] then bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FLAGS" != "x" ] then 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" ] then 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" ] then 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 - echo "error" + echo "Please provide a token and valid arguments" exit 1 -fi \ No newline at end of file +fi