This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Your other packages e.g. https://github.com/codecov/codecov-circleci-orb rely on the assumption that published versions are versioned in github c.f. codecov/codecov-circleci-orb#92 . However if a new version of codecov is added without the version string bumped, then you will publish the bash script but not version in github because not all errors in the version.sh script (without this change) are caught and passed out to CircleCI.
Notable Changes
Because of the way this change then interacts with the existing .circleci/config.yml script, errors on versioning will now be caught and prevent publishing if there is a problem, preventing this mismatch in future.
This will rely on the version string in the codecov script being updated when you want to release (which is required for changes to the bash script), and noting I haven't done this as I wanted to keep this PR for just the issue at hand and didn't want to force a release on merge.
Tests and Risks?
It adds a test in your CI to ensure that all parts of version.sh run.
Update the SHA hash files
n/a - a change to your CI script