Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions dist/codecov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ write_bool_args() {
echo "-$(lower $1)"
fi
}
parse_bool() {
if [ "$1" == "true" ] || [ "$1" == "1" ];
then
echo "true"
else
echo "false"
fi
}
b="\033[0;36m" # variables/constants
g="\033[0;32m" # info/debug
r="\033[0;31m" # errors
Expand Down Expand Up @@ -102,10 +110,12 @@ else
say " Version: $b$v$x"
say " "
fi
if [ "$CC_SKIP_VALIDATION" == "true" ] || [ -n "$CC_BINARY" ] || [ "$CC_USE_PYPI" == "true" ];
skip_validation="$(parse_bool "$CC_SKIP_VALIDATION")"
use_pypi="$(parse_bool "$CC_USE_PYPI")"
if [ "$skip_validation" == "true" ] || [ -n "$CC_BINARY" ] || [ "$use_pypi" == "true" ];
then
say "$r==>$x Bypassing validation..."
if [ "$CC_SKIP_VALIDATION" == "true" ];
if [ "$skip_validation" == "true" ];
then
chmod +x "$CC_COMMAND"
fi
Expand Down
9 changes: 9 additions & 0 deletions scripts/set_funcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ write_bool_args() {
fi
}

parse_bool() {
if [ "$1" == "true" ] || [ "$1" == "1" ];
then
echo "true"
else
echo "false"
fi
}

b="\033[0;36m" # variables/constants
g="\033[0;32m" # info/debug
r="\033[0;31m" # errors
Expand Down
7 changes: 5 additions & 2 deletions scripts/validate.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/usr/bin/env bash

if [ "$CODECOV_SKIP_VALIDATION" == "true" ] || [ -n "$CODECOV_BINARY" ] || [ "$CODECOV_USE_PYPI" == "true" ];
skip_validation="$(parse_bool "$CODECOV_SKIP_VALIDATION")"
use_pypi="$(parse_bool "$CODECOV_USE_PYPI")"

if [ "$skip_validation" == "true" ] || [ -n "$CODECOV_BINARY" ] || [ "$use_pypi" == "true" ];
then
say "$r==>$x Bypassing validation..."
if [ "$CODECOV_SKIP_VALIDATION" == "true" ];
if [ "$skip_validation" == "true" ];
then
chmod +x "$CODECOV_COMMAND"
fi
Expand Down