Skip to content

Commit

Permalink
fix[ci]: fix commithash calculation for pypi release
Browse files Browse the repository at this point in the history
there is a mismatch between the commit hash in the binary of the github
release vs the pypi release. for example,
```bash
~ $ vyper --version  # pipx install vyper==0.4.0
0.4.0+commit.e9db8d9
```
```bash
~ $ .vvm/vyper-0.4.0 --version
0.4.0+commit.e9db8d9f
```

this is due to how git computes the shorthash. when checkout is run for
release-pypi.yml, it doesn't fetch the full commit history, and so there
are fewer commits, so `git rev-parse --short HEAD` returns a smaller
fingerprint for the commit hash.

this commit amends the pypi release checkout step so that it matches the
github release workflow.
  • Loading branch information
charles-cooper committed Oct 15, 2024
1 parent a70a024 commit 6bd5821
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
# fetch unshallow so commit hash matches github release.
# see https://github.com/vyperlang/vyper/blob/8f9a8cac49aafb3fbc9dde78f0f6125c390c32f0/.github/workflows/build.yml#L27-L32
fetch-depth: 0

- name: Python
uses: actions/setup-python@v5
Expand Down

0 comments on commit 6bd5821

Please sign in to comment.