Skip to content
Merged
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
2 changes: 1 addition & 1 deletion dist/codecov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ g="\033[0;32m" # info/debug
r="\033[0;31m" # errors
x="\033[0m"
retry="--retry 5 --retry-delay 2"
CC_WRAPPER_VERSION="0.3.0"
CC_WRAPPER_VERSION="0.3.1"
CC_VERSION="${CC_VERSION:-latest}"
CC_FAIL_ON_ERROR="${CC_FAIL_ON_ERROR:-false}"
CC_RUN_CMD="${CC_RUN_CMD:-upload-coverage}"
Expand Down
26 changes: 26 additions & 0 deletions env
Original file line number Diff line number Diff line change
@@ -1,26 +1,52 @@

CC_ARGS
CC_AUTO_LOAD_PARAMS_FROM
CC_BASE_SHA
CC_BINARY
CC_BINARY_LOCATION
CC_BRANCH
CC_BUILD
CC_BUILD_URL
CC_CLEANUP
CC_CLI_ARGS
CC_CLI_TYPE
CC_CODE
CC_COMMAND
CC_DIR
CC_DOWNLOAD_DIR
CC_DOWNLOAD_ONLY
CC_ENTERPRISE_URL
CC_ENV
CC_EXCLUDES
CC_FAIL_ON_ERROR
CC_FILENAME
CC_FILES
CC_FLAGS
CC_GCOV_ARGS
CC_GCOV_EXECUTABLE
CC_GCOV_IGNORE
CC_GCOV_INCLUDE
CC_GIT_SERVICE
CC_JOB_CODE
CC_NAME
CC_NETWORK_FILTER
CC_NETWORK_PREFIX
CC_NETWORK_ROOT_FOLDER
CC_OS
CC_PARENT_SHA
CC_PLUGINS
CC_PR
CC_REPORT_TYPE
CC_RUN_CMD
CC_SERVICE
CC_SHA
CC_SKIP_VALIDATION
CC_SLUG
CC_SWIFT_PROJECT
CC_TOKEN
CC_TOKEN_VAR
CC_URL
CC_USE_PYPI
CC_VERSION
CC_WRAPPER_VERSION
CC_YML_PATH
10 changes: 4 additions & 6 deletions package.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,15 @@ def package_scripts(source_dir, source_root, outfile):
f.write(f'{var}\n')

def _get_vars(line):
matcher = r'(CODECOV_[\w_]+)'
matches = re.search(matcher, line)
if matches and matches.groups():
return matches.groups()[0]

matcher = r'v_arg ([\w_]+)'
matches = re.search(matcher, line)
if matches and matches.groups():
return f"CC_{matches.groups()[0]}"

matcher = r'(CC_[\w_]+)'

@calvin-codecov calvin-codecov Sep 15, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: would we want a ^ for start of string before CC?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it doesn't make a difference at the moment since all of the variables currently only start with CC so this would only be for defensive purposes.

@thomasrockhu-codecov thomasrockhu-codecov Sep 15, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no actually, reason being that sometimes there is whitespace before the var declaration (e.g. a tab), but this is more to catch any vars that match it

matches = re.search(matcher, line)
if matches and matches.groups():
return matches.groups()[0]
return ''

def _parse(file):
Expand Down Expand Up @@ -63,4 +62,3 @@ def _get_script_from_line(line):

if __name__=="__main__":
package_scripts('scripts', 'run.sh', 'dist/codecov.sh')
package_scripts('scripts', 'run.sh', 'dist/prevent.sh')
2 changes: 1 addition & 1 deletion scripts/set_defaults.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

CODECOV_WRAPPER_VERSION="0.3.0"
CODECOV_WRAPPER_VERSION="0.3.1"
CODECOV_VERSION="${CODECOV_VERSION:-latest}"
CODECOV_FAIL_ON_ERROR="${CODECOV_FAIL_ON_ERROR:-false}"
CODECOV_RUN_CMD="${CODECOV_RUN_CMD:-upload-coverage}"
Expand Down
Loading