Sealer's Makefile and build.sh scripts are too simple and outdated. They need to be improved to be more user-friendly. The reconstruction of the Makefile involves many changes, including adjustments to some modules and changes to CICD actions. I have proposed an RFC, which can be viewed at https://github.com/sealerio/sealer/issues/2148 for this purpose.
There is a similar case in the horizoncd community at NetEase, where I have successfully designed a complete Makefile process that can be used. I have also helped them improve their contributor documentation at [https://github.com/horizoncd/horizon/blob/main/CONTRIBUTING.md.](https://github.com/horizoncd/horizon/blob/main/CONTRIBUTING.md) In their project, we can find a set of already implemented solutions and proposed design documents at https://github.com/horizoncd/horizon/issues/100:
Compared with horizon, Sealer's design has some dangerous signals:
cgo\\c
code in Sealer involves containers_image_openpgp exclude_graphdriver_devicemapper exclude_graphdriver_btrfs
for compilation.image/README.md at ed2844ccc615a447b98344d1bbefca61b3cb7749 · mtrmac/image
This increases the difficulty of compilation and testing. After research, I chose the test plan junit-report
and used the tmp
temporary directory as a cache to speed up the coverage test.
Migrate directory version/version.go → pkg/version/version.go
Rename hack/
to scripts/
The functions of these files are as follows: