Repository navigation
Quote injected release version so numeric versions stay strings - #197
Merged
Merged
Conversation
A purely numeric release title (e.g. 1.0) was substituted into the project config unquoted, so ESPHome parsed `version: 1.0` as a float and failed the build. Quote the value so it is always a YAML string.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #149.
A release whose title is purely numeric (e.g.
1.0) broke the build.build.ymlinjects the release version into each project config withsed, and the replacement was unquoted, so the generated config readversion: 1.0. ESPHome's YAML parser interprets that as a float and fails validation with "Must be string, got EFloat". Quoting the substituted value makes it always a YAML string (version: "1.0").Added
tests/ci-numeric.yamland a dedicatedci-numeric-version.ymlworkflow that builds it withrelease-version: "1.0", exercising the real sed + build path end to end. Without the fix the ESPHome build fails and no manifest is produced. It lives in its own workflow rather than a job inci.ymlbecauseci.yml's verify jobs download every artifact of their run and assume one shared version directory, which the1.0/directory would break - the same reasonci-draft-release.ymlis split out.