celo-monorepo
celo-monorepo copied to clipboard
Return to the correct original git state
Description
The version check script checks out contracts from prior git refs, then should return to the original state. We tried to use -
to return to the previously checked out ref, but this only works when checking out the entire ref, whereas here we were using it to checkout only a specific files (... -- contracts/
). This was resulting in an unexpected git tree after the script ran. This PR fixes this behavior in the check-versions.sh script, and release-lib.sh, on which it depends.
Tested
Ran check-versions.sh multiple times on different branches while investigating #9753, after these fixes, ended with clean git tree after each run.
Related issues
- Fixes #9323