# headfile **Repository Path**: chunrufenglin/headfile ## Basic Information - **Project Name**: headfile - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-19 - **Last Updated**: 2025-07-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # headfile - 构建信息生成工具 一个用Go编写的工具,用于自动生成和更新构建信息头文件(build_info.h)。 ## 功能特性 - 自动生成包含时间戳和版本信息的C头文件 - 每次运行自动更新构建时间戳 - 自动递增补丁版本号 - 支持版本号格式:MAJOR.MINOR.PATCH ## 安装要求 - Go 1.24.4 或更高版本 ## 使用说明 1. 构建项目: ```bash go build ``` 2. 运行程序: ```bash ./headfile ``` 程序会自动: - 如果build_info.h不存在,创建新文件 - 如果build_info.h已存在,更新时间戳和版本号 ## 输出文件说明 生成的build_info.h包含以下定义: ```c #define BUILD_TIME_STAMP [unix时间戳] #define BUILD_VERSION_MAJOR 0 #define BUILD_VERSION_MINOR 0 #define BUILD_VERSION_PATCH [递增的补丁号] ``` ## 贡献指南 欢迎提交Pull Request。请确保: - 代码符合Go编码规范 - 包含必要的测试 - 更新相关文档 ## 许可证 [MIT](LICENSE)