kairos
kairos copied to clipboard
Fix Auroraboot for new artifact names
A first PR here: https://github.com/kairos-io/AuroraBoot/pull/47/files but it is missing a fix for the rest of the fields (flavor release, arch)
We can move the naming.sh script to a golang importable module so that it can also be used by Auroraboot.
This might also allow us to create a simple web server to implement this as well: https://github.com/kairos-io/kairos/issues/1991
We can also build it as a binary to be used inside Dockerfiles if needed.
By having it in golang, it might also allow us to do more. E.g. Given an artifact name, return the model. Or even, given a bootable artifact name, give me the container image.
@mauromorales I think we fixed Auroraboot for now. Refactoring and reusing the naming.sh logic it not as urgent. I can move it lower in the priorities if it's fixed.
@jimmykarily is this still relevant or we can close it?
@jimmykarily is this still relevant or we can close it?
There is a lot of logic that is duplicating what versioneer is doing: https://github.com/kairos-io/AuroraBoot/blob/4dc700c71230c1c5af379ab10b8364fdfcf7d8d5/pkg/schema/artifact.go#L22-L55
iirc naming.sh was versioneer's bash-based ancestor.
We can import versioneer as a library in Auroraboot and get rid of the duplication, hopefully saving us from bugs down the line.