File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 workflow_dispatch :
55 inputs :
66 version :
7- description : ' 新版本号 (如 17.11.35 )'
7+ description : ' 新版本号 (当前版本是 17.11.47 )'
88 required : true
99
1010jobs :
1616 with :
1717 token : ${{ secrets.PAT_TOKEN }} # 需要一个具有写权限的个人访问令牌
1818
19+ - name : Get current version
20+ run : |
21+ CURRENT_VERSION=$(grep -oP 'set_version \("\K[^"]+' xmake.lua)
22+ echo "Current version: $CURRENT_VERSION"
23+ echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
24+
1925 - name : Set new version to env
2026 run : |
2127 echo "NEW_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
3339 run : |
3440 # Update xmake.lua
3541 sed -i "s/^set_version (\"[^\"]*\")/set_version (\"${{ env.NEW_VERSION }}\")/" xmake.lua
42+
43+ # Update ci_bump_version.yml description
44+ sed -i 's/当前版本是 [0-9]\+\.[0-9]\+\.[0-9]\+/当前版本是 ${{ env.NEW_VERSION }}/' .github/workflows/ci_bump_version.yml
3645
3746 # Update src/goldfish.hpp
3847 sed -i "s/#define GOLDFISH_VERSION \"[^\"]*\"/#define GOLDFISH_VERSION \"${{ env.NEW_VERSION }}\"/" src/goldfish.hpp
Original file line number Diff line number Diff line change @@ -138,6 +138,27 @@ tools/
138138
139139` fix ` 命令保持现有实现不变,不使用本规范定义的工具注册系统。
140140
141+ ## 2026/04/12 修复 xmake.lua 打包配置
142+
143+ ### What
144+ 修复 ` xmake.lua ` 中的 ` add_installfiles ` 配置,解决 v17.11.47 打包漏文件问题:
145+
146+ 1 . 添加 ` gfproject.json ` 到安装文件列表
147+ 2 . 修复 tools 目录路径(` goldtest ` →` test ` , ` golddoc ` →` doc ` )
148+ 3 . 添加缺失的 ` tools/help/ ` 和 ` tools/version/ ` 目录
149+ 4 . 使用 ` (tools/**) ` 通配符打包整个 tools 目录,避免以后遗漏新文件
150+
151+ ### Why
152+ v17.11.47 打包后的版本所有子命令都无法使用,因为:
153+ - ` gfproject.json ` 未被包含在打包文件中
154+ - tools 目录结构变更后(` goldtest ` →` test ` 等),xmake.lua 未及时更新
155+ - 新添加的 ` help ` 和 ` version ` 工具未添加到打包配置
156+
157+ ### How
158+ 简化配置,使用 ` (tools/**) ` 通配符一次性打包整个 tools 目录,同时保留 ` gfproject.json ` 的单独配置。
159+
160+ ---
161+
141162## 2026/04/12 修复工具搜索路径
142163
143164### What
@@ -177,6 +198,7 @@ tools/
177198- ` tools/doc/README.md ` - doc 命令帮助文档
178199- ` tools/source/README.md ` - source 命令帮助文档
179200- ` src/goldfish.hpp ` - C++ 代码中的动态工具加载逻辑
201+ - ` xmake.lua ` - 打包配置(含 ` add_installfiles ` )
180202
181203## 提交计划
182204
Original file line number Diff line number Diff line change @@ -158,11 +158,8 @@ target ("goldfish") do
158158 add_installfiles (" $(projectdir)/goldfish/(srfi/*.scm)" , {prefixdir = " share/goldfish" })
159159 add_installfiles (" $(projectdir)/goldfish/(liii/*.scm)" , {prefixdir = " share/goldfish" })
160160 add_installfiles (" $(projectdir)/goldfish/(guenchi/*.scm)" , {prefixdir = " share/goldfish" })
161- add_installfiles (" $(projectdir)/tools/goldfix/main.scm" , {prefixdir = " share/goldfish/tools/goldfix" })
162- add_installfiles (" $(projectdir)/tools/goldfix/(liii/*.scm)" , {prefixdir = " share/goldfish/tools/goldfix" })
163- add_installfiles (" $(projectdir)/tools/goldtest/liii/goldtest.scm" , {prefixdir = " share/goldfish/tools/goldtest/liii" })
164- add_installfiles (" $(projectdir)/tools/golddoc/(liii/*.scm)" , {prefixdir = " share/goldfish/tools/golddoc" })
165- add_installfiles (" $(projectdir)/tools/goldsource/(liii/*.scm)" , {prefixdir = " share/goldfish/tools/goldsource" })
161+ add_installfiles (" $(projectdir)/gfproject.json" , {prefixdir = " share/goldfish" })
162+ add_installfiles (" $(projectdir)/(tools/**)" , {prefixdir = " share/goldfish" })
166163 add_installfiles (" $(projectdir)/(tests/**)" , {prefixdir = " share/goldfish" })
167164end
168165
You can’t perform that action at this time.
0 commit comments