Skip to content

Commit

Permalink
chore(release): 0.0.29 and some small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu-codecov committed Dec 5, 2024
1 parent c63f5c9 commit ddd81e5
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 12 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,14 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_FAIL_ON_ERROR: true
CODECOV_FLAGS: flag1,flag2
shellcheck:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install shellcheck
run: brew install shellcheck
- name: Run shellcheck
# TODO: fix shellcheck
# run: shellcheck dist/codecov.sh -x
run: shellcheck dist/codecov.sh
12 changes: 6 additions & 6 deletions dist/codecov.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env bash
CC_WRAPPER_VERSION="0.0.28"
CC_WRAPPER_VERSION="0.0.29"
set +u
say() {
echo -e "$1"
}
exit_if_error() {
say "$r==> $1$x"
if [ $CC_FAIL_ON_ERROR = true ];
if [ "$CC_FAIL_ON_ERROR" = true ];
then
say "$r Exiting...$x"
exit 1;
Expand Down Expand Up @@ -78,16 +78,16 @@ else
[[ $cc_os == "windows" ]] && cc_filename+=".exe"
export cc_filename=${cc_filename}
[[ $cc_os == "macos" ]] && \
! command -v gpg 2>&1 >/dev/null && \
! command -v gpg 2>&1 && \
HOMEBREW_NO_AUTO_UPDATE=1 brew install gpg
cc_url="https://cli.codecov.io"
cc_url="$cc_url/${CC_VERSION}"
cc_url="$cc_url/${cc_os}/${cc_filename}"
say "$g ->$x Downloading $b${cc_url}$x"
curl -Os $cc_url
curl -Os "$cc_url"
say "$g==>$x Finishing downloading $b${cc_os}:${CC_VERSION}$x"
version_url="https://cli.codecov.io/${cc_os}/${CC_VERSION}"
version=$(curl -s $version_url -H "Accept:application/json" | jq -r '.version')
version=$(curl -s "$version_url" -H "Accept:application/json" | jq -r '.version')
say " Version: $b$version$x"
say " "
fi
Expand Down Expand Up @@ -123,7 +123,7 @@ fi
cc_cli_args=()
cc_cli_args+=( $(k_arg AUTO_LOAD_PARAMS_FROM) $(v_arg AUTO_LOAD_PARAMS_FROM))
cc_cli_args+=( $(k_arg ENTERPRISE_URL) $(v_arg ENTERPRISE_URL))
if [ -n $CC_YML_PATH ]
if [ -n "$CC_YML_PATH" ]
then
cc_cli_args+=( "--codecov-yml-path" )
cc_cli_args+=( "$CC_YML_PATH" )
Expand Down
6 changes: 3 additions & 3 deletions scripts/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ else
[[ $codecov_os == "windows" ]] && codecov_filename+=".exe"
export codecov_filename=${codecov_filename}
[[ $codecov_os == "macos" ]] && \
! command -v gpg 2>&1 >/dev/null && \
! command -v gpg 2>&1 && \
HOMEBREW_NO_AUTO_UPDATE=1 brew install gpg
codecov_url="https://cli.codecov.io"
codecov_url="$codecov_url/${CODECOV_VERSION}"
codecov_url="$codecov_url/${codecov_os}/${codecov_filename}"
say "$g ->$x Downloading $b${codecov_url}$x"
curl -Os $codecov_url
curl -Os "$codecov_url"
say "$g==>$x Finishing downloading $b${codecov_os}:${CODECOV_VERSION}$x"

version_url="https://cli.codecov.io/${codecov_os}/${CODECOV_VERSION}"
version=$(curl -s $version_url -H "Accept:application/json" | jq -r '.version')
version=$(curl -s "$version_url" -H "Accept:application/json" | jq -r '.version')
say " Version: $b$version$x"
say " "
fi
2 changes: 1 addition & 1 deletion scripts/set_cli_args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ codecov_cli_args=()

codecov_cli_args+=( $(k_arg AUTO_LOAD_PARAMS_FROM) $(v_arg AUTO_LOAD_PARAMS_FROM))
codecov_cli_args+=( $(k_arg ENTERPRISE_URL) $(v_arg ENTERPRISE_URL))
if [ -n $CODECOV_YML_PATH ]
if [ -n "$CODECOV_YML_PATH" ]
then
codecov_cli_args+=( "--codecov-yml-path" )
codecov_cli_args+=( "$CODECOV_YML_PATH" )
Expand Down
2 changes: 1 addition & 1 deletion scripts/set_defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ say() {

exit_if_error() {
say "$r==> $1$x"
if [ $CODECOV_FAIL_ON_ERROR = true ];
if [ "$CODECOV_FAIL_ON_ERROR" = true ];
then
say "$r Exiting...$x"
exit 1;
Expand Down
Empty file modified scripts/set_upload_coverage_args.sh
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion scripts/version.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env bash
CODECOV_WRAPPER_VERSION="0.0.28"
CODECOV_WRAPPER_VERSION="0.0.29"

0 comments on commit ddd81e5

Please sign in to comment.