Repository navigation
Add name-from-file input to name firmware after the YAML file - #198
Merged
Merged
Conversation
Configs that share esphome.name and chip variant (e.g. hardware revisions) produced identical firmware and artifact names and collided. name-from-file names the files and artifact after the YAML file instead, rewriting the manifest paths to match, so the device keeps its hostname.
CI Draft Release auto-discovers every *.factory.yaml, so the new test configs were built there too. Use .factory.yml and plain .yaml instead, which still covers both stem rules.
Rather than hiding the revision configs from the draft-release smoke test, run its auto-discovery job with name-from-file so the pass-through to build.yml is covered. ci-revision-a stays a discovered .factory.yaml and ci-revision-b uses .factory.yml to keep both stem rules covered in ci.yml.
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 #162.
Configs that share
esphome.nameand chip variant, such as hardware revisions of the same device, produce identical firmware file names and artifact names, so they collide. The only workaround was giving each config a differentesphome.name, which also changes the device hostname.This adds an opt-in
name-from-fileinput tobuild.yml(and passes it through frombuild-to-draft-release.yml). When set, the firmware files and the artifact are named after the YAML file instead: the file name without its.yaml/.ymlextension and a trailing.factory, with the chip variant still appended. For examplemy-device-rev-a.factory.yamlwithname: my-deviceon an esp32c3 producesmy-device-rev-a-esp32c3.factory.binin artifactmy-device-rev-a. The paths inmanifest.jsonare rewritten to match, so the upload workflows need no changes. It also works withcombined-name. With the input off, behaviour is unchanged.CI gains two scenarios (standalone and combined) building two configs that share
name: ci-revision, verifying the renamed binaries, that every manifest path resolves, and that no file keeps the original name.