Skip to content

Commit 66c6cf2

Browse files
committed
docs: refresh Tauri links and test guide
1 parent 70692da commit 66c6cf2

File tree

5 files changed

+58
-116
lines changed

5 files changed

+58
-116
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ First-time packaging requires environment setup and may be slower, subsequent bu
177177

178178
## Development
179179

180-
Requires Rust `>=1.85` and Node `>=22`. For detailed installation guide, see [Tauri documentation](https://tauri.app/start/prerequisites/). If unfamiliar with development environment, use the CLI tool instead.
180+
Requires Rust `>=1.85` and Node `>=22`. For detailed installation guide, see [Tauri documentation](https://v2.tauri.app/start/prerequisites/). If unfamiliar with development environment, use the CLI tool instead.
181181

182182
```bash
183183
# Install dependencies

docs/advanced-usage.md

Lines changed: 28 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Understanding Pake's codebase structure will help you navigate and contribute ef
169169

170170
**Windows:**
171171

172-
- **CRITICAL**: Consult [Tauri prerequisites](https://tauri.app/start/prerequisites/) before proceeding
172+
- **CRITICAL**: Consult [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/) before proceeding
173173
- Windows 10 SDK (10.0.19041.0) and Visual Studio Build Tools 2022 (≥17.2)
174174
- Required redistributables:
175175
1. Microsoft Visual C++ 2015-2022 Redistributable (x64)
@@ -252,78 +252,51 @@ This script reads the configuration and packages the specified app in watch mode
252252

253253
### Testing Guide
254254

255-
Comprehensive CLI build test suite for validating multi-platform packaging functionality.
255+
Comprehensive CLI build and release validation guidance for multi-platform packaging.
256256

257257
#### Running Tests
258258

259259
```bash
260260
# Complete test suite (recommended)
261-
pnpm test # Run full test suite including real build tests (8-12 minutes)
261+
pnpm test # Build the CLI, run the Vitest suite, then run real build + release workflow smoke tests
262262

263-
# Quick testing during development
264-
pnpm test -- --no-build # Skip build tests, validate core functionality only (30 seconds)
263+
# Skip the real build and release workflow smoke tests
264+
pnpm test -- --no-build
265265

266-
# Build CLI for testing
266+
# Run the fast Vitest suite only
267+
npx vitest run
268+
269+
# Build the CLI explicitly
267270
pnpm run cli:build
271+
272+
# Run the release workflow smoke test directly
273+
node ./tests/release.js
268274
```
269275

270276
#### 🚀 Complete Test Suite Includes
271277

272-
-**Unit Tests**: CLI commands, parameter validation, response time
273-
-**Integration Tests**: Process management, file permissions, dependency resolution
274-
-**Builder Tests**: Platform detection, architecture detection, file naming
275-
-**Real Build Tests**: Complete GitHub.com app packaging validation
278+
-**Vitest suite**: unit, integration, builder, and CLI option coverage
279+
-**Real build smoke test**: platform-aware packaging validation
280+
-**Release workflow smoke test**: verifies the release build path used for popular apps
276281

277282
#### Test Details
278283

279-
**Unit Tests (6 tests)**
280-
281-
- Version command (`--version`)
282-
- Help command (`--help`)
283-
- URL validation (valid/invalid links)
284-
- Parameter validation (number type checking)
285-
- CLI response time (<2 seconds)
286-
- Weekly URL accessibility
287-
288-
**Integration Tests (3 tests)**
289-
290-
- Process spawning and management
291-
- File system permission checks
292-
- Dependency package resolution validation
293-
294-
**Builder Tests (3 tests)**
295-
296-
- Platform detection (macOS/Windows/Linux)
297-
- Architecture detection (Intel/ARM64)
298-
- File naming pattern verification
299-
300-
**Real Build Tests (Focus)**
301-
302-
_macOS_: 🔥 Multi-architecture build (Universal binary)
284+
- `pnpm test` runs the main CLI test runner in [`tests/index.js`](../tests/index.js), which:
285+
- builds the CLI,
286+
- runs the Vitest suite,
287+
- runs the real build smoke test unless `--no-build` is passed,
288+
- and then runs the release workflow smoke test when the real build phase succeeds.
303289

304-
- Compile Intel + Apple Silicon dual architecture
305-
- Detect `.app` file generation: `GitHubMultiArch.app`
306-
- Fallback detection: `src-tauri/target/universal-apple-darwin/release/bundle/macos/`
307-
- Verify universal binary: `file` command architecture check
290+
Useful optional flags:
308291

309-
_Windows_: Single architecture build
292+
- `--no-unit`: skip unit tests
293+
- `--no-integration`: skip integration tests
294+
- `--no-builder`: skip builder tests
295+
- `--no-build`: skip the real build smoke test and the follow-up release workflow smoke test
296+
- `--e2e`: add end-to-end configuration tests
297+
- `--pake-cli`: add GitHub Actions related checks
310298

311-
- Detect EXE file: `src-tauri/target/x86_64-pc-windows-msvc/release/pake.exe`
312-
- Detect MSI installer: `src-tauri/target/x86_64-pc-windows-msvc/release/bundle/msi/*.msi`
313-
314-
_Linux_: Single architecture build
315-
316-
- Detect DEB package: `src-tauri/target/release/bundle/deb/*.deb`
317-
- Detect AppImage: `src-tauri/target/release/bundle/appimage/*.AppImage`
318-
319-
#### Release Build Testing
320-
321-
```bash
322-
# Actual build testing (tests weread + twitter apps)
323-
node ./tests/release.js
324-
```
325-
326-
Real build of 2 application packages to verify complete packaging flow and release.yml logic.
299+
If you only want the release workflow smoke test, run `node ./tests/release.js` directly.
327300

328301
#### Troubleshooting
329302

@@ -332,8 +305,6 @@ Real build of 2 application packages to verify complete packaging flow and relea
332305
- **Build failures**: Check Rust toolchain with `rustup update`
333306
- **Permission errors**: Ensure write permissions are available
334307

335-
Total: **13 tests** - all passing indicates CLI functionality is working properly. Recommend running `pnpm test` before code commits to ensure all platforms build correctly.
336-
337308
### Common Build Issues
338309

339310
- **Rust compilation errors**: Run `cargo clean` in `src-tauri/` directory

docs/advanced-usage_CN.md

Lines changed: 27 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ pake ./my-app/index.html --name my-static-app --use-local-file
169169

170170
**Windows:**
171171

172-
- **重要**:请先参阅 [Tauri 依赖项指南](https://tauri.app/start/prerequisites/)
172+
- **重要**:请先参阅 [Tauri 依赖项指南](https://v2.tauri.app/start/prerequisites/)
173173
- Windows 10 SDK (10.0.19041.0) 和 Visual Studio Build Tools 2022 (≥17.2)
174174
- 必需的运行库:
175175
1. Microsoft Visual C++ 2015-2022 Redistributable (x64)
@@ -252,78 +252,51 @@ pnpm run cli:dev
252252

253253
### 测试指南
254254

255-
统一的 CLI 构建测试套件,用于验证多平台打包功能。
255+
统一的 CLI 构建与发布验证指南,用于验证多平台打包功能。
256256

257257
#### 运行测试
258258

259259
```bash
260260
# 完整测试套件(推荐)
261-
pnpm test # 运行完整测试套件,包含真实构建测试(8-12分钟)
261+
pnpm test # 构建 CLI,运行 Vitest 套件,再执行真实构建和发布流程 smoke test
262262

263-
# 开发时快速测试
264-
pnpm test -- --no-build # 跳过构建测试,仅验证核心功能(30秒)
263+
# 跳过真实构建和发布流程 smoke test
264+
pnpm test -- --no-build
265+
266+
# 仅运行快速 Vitest 套件
267+
npx vitest run
265268

266269
# 构建 CLI 以供测试
267270
pnpm run cli:build
271+
272+
# 单独运行发布流程 smoke test
273+
node ./tests/release.js
268274
```
269275

270276
#### 🚀 完整测试套件包含
271277

272-
-**单元测试**:CLI命令、参数验证、响应时间
273-
-**集成测试**:进程管理、文件权限、依赖解析
274-
-**构建器测试**:平台检测、架构检测、文件命名
275-
-**真实构建测试**:完整的GitHub.com应用打包验证
278+
-**Vitest 套件**:单元、集成、构建器和 CLI 选项覆盖
279+
-**真实构建 smoke test**:按平台验证实际打包流程
280+
-**发布流程 smoke test**:验证 popular apps 的发布构建路径
276281

277282
#### 测试内容详情
278283

279-
**单元测试(6个)**
280-
281-
- 版本命令 (`--version`)
282-
- 帮助命令 (`--help`)
283-
- URL 验证(有效/无效链接)
284-
- 参数验证(数字类型检查)
285-
- CLI 响应时间(<2秒)
286-
- Weekly URL 可访问性
287-
288-
**集成测试(3个)**
289-
290-
- 进程生成和管理
291-
- 文件系统权限检查
292-
- 依赖包解析验证
293-
294-
**构建测试(3个)**
295-
296-
- 平台检测(macOS/Windows/Linux)
297-
- 架构检测(Intel/ARM64)
298-
- 文件命名模式验证
299-
300-
**真实构建测试(重点)**
301-
302-
_macOS_: 🔥 多架构构建(通用二进制)
284+
- `pnpm test` 会运行 [`tests/index.js`](../tests/index.js) 这个主测试入口,它会:
285+
- 先构建 CLI,
286+
- 再运行 Vitest 套件,
287+
- 如果没有传 `--no-build`,继续执行真实构建 smoke test,
288+
- 然后在真实构建成功后继续执行发布流程 smoke test。
303289

304-
- 编译 Intel + Apple Silicon 双架构
305-
- 检测 `.app` 文件生成:`GitHubMultiArch.app`
306-
- 备用检测:`src-tauri/target/universal-apple-darwin/release/bundle/macos/`
307-
- 验证通用二进制:`file` 命令检查架构
290+
常用可选参数:
308291

309-
_Windows_: 单架构构建
292+
- `--no-unit`:跳过单元测试
293+
- `--no-integration`:跳过集成测试
294+
- `--no-builder`:跳过构建器测试
295+
- `--no-build`:跳过真实构建 smoke test 以及后续的发布流程 smoke test
296+
- `--e2e`:增加端到端配置测试
297+
- `--pake-cli`:增加 GitHub Actions 相关检查
310298

311-
- 检测 EXE 文件:`src-tauri/target/x86_64-pc-windows-msvc/release/pake.exe`
312-
- 检测 MSI 安装包:`src-tauri/target/x86_64-pc-windows-msvc/release/bundle/msi/*.msi`
313-
314-
_Linux_: 单架构构建
315-
316-
- 检测 DEB 包:`src-tauri/target/release/bundle/deb/*.deb`
317-
- 检测 AppImage:`src-tauri/target/release/bundle/appimage/*.AppImage`
318-
319-
#### 发布构建测试
320-
321-
```bash
322-
# 实际构建测试(固定测试 weread + twitter 两个应用)
323-
node ./tests/release.js
324-
```
325-
326-
真实构建2个应用包,验证完整的打包流程和 release.yml 逻辑是否正常工作。
299+
如果只想单独验证发布流程,可以直接运行 `node ./tests/release.js`
327300

328301
#### 故障排除
329302

@@ -332,8 +305,6 @@ node ./tests/release.js
332305
- **构建失败**:检查 Rust 工具链 `rustup update`
333306
- **权限错误**:确保有写入权限
334307

335-
总计:**13 个测试**,全部通过表示 CLI 功能正常。提交代码前建议运行 `pnpm test` 确保所有平台构建正常。
336-
337308
### 常见构建问题
338309

339310
- **Rust 编译错误**: 在 `src-tauri/` 目录中运行 `cargo clean`

docs/cli-usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ pake https://chat.example.com --name ChatApp --multi-window
467467

468468
#### [installer-language]
469469

470-
Set the Windows Installer language. Options include `zh-CN`, `ja-JP`, More at [Tauri Document](https://tauri.app/distribute/windows-installer/#internationalization). Default is `en-US`.
470+
Set the Windows Installer language. Options include `zh-CN`, `ja-JP`, More at [Tauri docs](https://v2.tauri.app/distribute/windows-installer/#internationalization). Default is `en-US`.
471471

472472
```shell
473473
--installer-language <language>

docs/cli-usage_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ pake https://chat.example.com --name ChatApp --multi-window
465465

466466
#### [installer-language]
467467

468-
设置 Windows 安装包语言。支持 `zh-CN``ja-JP`,更多在 [Tauri 文档](https://tauri.app/distribute/windows-installer/#internationalization)。默认为 `en-US`
468+
设置 Windows 安装包语言。支持 `zh-CN``ja-JP`,更多在 [Tauri 文档](https://v2.tauri.app/distribute/windows-installer/#internationalization)。默认为 `en-US`
469469

470470
```shell
471471
--installer-language <language>

0 commit comments

Comments
 (0)