中文

[中文] sealer 构建工程设计 (1)

Cause

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.

Case

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:

GitHub - horizoncd/horizon: Production-Grade GitOps CD PlatForm For CloudNative Applications, MiddleWares, etc.

Compared with horizon, Sealer's design has some dangerous signals:

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.

Module Plan

Migrate directory version/version.go → pkg/version/version.go

Rename hack/ to scripts/

The functions of these files are as follows: