Fix release version number for non-manual releases. #595
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.
What do these changes do?
The v0.5.0 release action silently failed to generate valid wheel files: specifically, for macOS and Windows the version number was set as v0.0.0 - this can be seen in the logs: https://github.com/larq/compute-engine/actions/runs/520610384.
I manually cancelled the run just before the PyPI upload step - had I not, I think we would have ended up accidentally publishing v0.0.0 wheels for Mac and Windows.
For some reason (and I didn't realise this was possible) this
os.getenv
call was returning the empty string:compute-engine/setup.py
Line 24 in aa7ea1b
This PR makes a small change to the way the version number is calculated, and adds a sanity check that throws if the empty string is returned.
How Has This Been Tested?
Manually generating the package.
Benchmark Results
N/A.
Related issue number
N/A.