feat: add version_file input to read the kind version from a file - #162
Conversation
51b743d to
335bb70
Compare
|
Small ping 🙂 — this has been green and awaiting review for about 4 weeks now. Happy to rebase or address any feedback whenever a maintainer has a chance to take a look. Thanks for maintaining this project! |
|
Open since June with no review. Rather than ping again: is a |
Signed-off-by: somaz <genius5711@gmail.com>
335bb70 to
a939a55
Compare
| # Resolve the kind version from a version file. Supports the asdf | ||
| # '.tool-versions' format (a line such as "kind v0.33.0") as well as a plain | ||
| # file that contains only the version string. | ||
| resolve_version_from_file() { |
There was a problem hiding this comment.
can we also parse if i have a file that have only the version?
like
.kind_version
then in the file
v0.23.0
There was a problem hiding this comment.
then add a test for that as well
There was a problem hiding this comment.
Plain files already work: when there's no kind line, the first non-comment line is used as the version, so a .kind_version containing v0.23.0 resolves to v0.23.0. Added a test-with-plain-version-file job for exactly that, and bumped the checkout pin in the version-file job to v7.0.1 to match the other jobs.
Signed-off-by: somaz <genius5711@gmail.com>
Adds a
version_fileinput that reads the kind version from a file, so theversion can live in a single source of truth (for example an asdf
.tool-versionsfile) instead of being hard-coded in the workflow..tool-versionslayout (thekindentry) and plainversion files.
v, e.g.v0.31.0),consistent with the existing
versioninput.version_filetakes precedence overversion.Validation
test-with-version-filejob that writeskind v0.23.0to a.tool-versionsfile and asserts the installed kind version isv0.23.0(the action default is
v0.31.0, so the assertion proves the file drovethe install).
comment/blank-line file, extra whitespace, CRLF endings, multi-token line,
missing file, empty file.
bash -n main.shpasses.This PR was prepared with AI assistance (Claude Code). All changes were
reviewed and tested by me before submission.