Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

docs: refresh Tauri links and test guide

Tw9366c6cf2463db
diff --git a/README.md b/README.md
index b23fda5b..a837089b 100644
--- a/README.md
+++ b/README.md
@@ -177,7 +177,7 @@ First-time packaging requires environment setup and may be slower, subsequent bu
## Development
-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.
+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.
```bash
# Install dependencies
diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md
index 7a9f42b3..12dbe3e5 100644
--- a/docs/advanced-usage.md
+++ b/docs/advanced-usage.md
@@ -169,7 +169,7 @@ Understanding Pake's codebase structure will help you navigate and contribute ef
**Windows:**
-- **CRITICAL**: Consult [Tauri prerequisites](https://tauri.app/start/prerequisites/) before proceeding
+- **CRITICAL**: Consult [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/) before proceeding
- Windows 10 SDK (10.0.19041.0) and Visual Studio Build Tools 2022 (≥17.2)
- Required redistributables:
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
### Testing Guide
-Comprehensive CLI build test suite for validating multi-platform packaging functionality.
+Comprehensive CLI build and release validation guidance for multi-platform packaging.
#### Running Tests
```bash
# Complete test suite (recommended)
-pnpm test # Run full test suite including real build tests (8-12 minutes)
+pnpm test # Build the CLI, run the Vitest suite, then run real build + release workflow smoke tests
-# Quick testing during development
-pnpm test -- --no-build # Skip build tests, validate core functionality only (30 seconds)
+# Skip the real build and release workflow smoke tests
+pnpm test -- --no-build
-# Build CLI for testing
+# Run the fast Vitest suite only
+npx vitest run
+
+# Build the CLI explicitly
pnpm run cli:build
+
+# Run the release workflow smoke test directly
+node ./tests/release.js
```
#### 🚀 Complete Test Suite Includes
-- ✅ **Unit Tests**: CLI commands, parameter validation, response time
-- ✅ **Integration Tests**: Process management, file permissions, dependency resolution
-- ✅ **Builder Tests**: Platform detection, architecture detection, file naming
-- ✅ **Real Build Tests**: Complete GitHub.com app packaging validation
+- ✅ **Vitest suite**: unit, integration, builder, and CLI option coverage
+- ✅ **Real build smoke test**: platform-aware packaging validation
+- ✅ **Release workflow smoke test**: verifies the release build path used for popular apps
#### Test Details
-**Unit Tests (6 tests)**
-
-- Version command (`--version`)
-- Help command (`--help`)
-- URL validation (valid/invalid links)
-- Parameter validation (number type checking)
-- CLI response time (<2 seconds)
-- Weekly URL accessibility
-
-**Integration Tests (3 tests)**
-
-- Process spawning and management
-- File system permission checks
-- Dependency package resolution validation
-
-**Builder Tests (3 tests)**
-
-- Platform detection (macOS/Windows/Linux)
-- Architecture detection (Intel/ARM64)
-- File naming pattern verification
-
-**Real Build Tests (Focus)**
-
-_macOS_: 🔥 Multi-architecture build (Universal binary)
+- `pnpm test` runs the main CLI test runner in [`tests/index.js`](../tests/index.js), which:
+- builds the CLI,
+- runs the Vitest suite,
+- runs the real build smoke test unless `--no-build` is passed,
+- and then runs the release workflow smoke test when the real build phase succeeds.
-- Compile Intel + Apple Silicon dual architecture
-- Detect `.app` file generation: `GitHubMultiArch.app`
-- Fallback detection: `src-tauri/target/universal-apple-darwin/release/bundle/macos/`
-- Verify universal binary: `file` command architecture check
+Useful optional flags:
-_Windows_: Single architecture build
+- `--no-unit`: skip unit tests
+- `--no-integration`: skip integration tests
+- `--no-builder`: skip builder tests
+- `--no-build`: skip the real build smoke test and the follow-up release workflow smoke test
+- `--e2e`: add end-to-end configuration tests
+- `--pake-cli`: add GitHub Actions related checks
-- Detect EXE file: `src-tauri/target/x86_64-pc-windows-msvc/release/pake.exe`
-- Detect MSI installer: `src-tauri/target/x86_64-pc-windows-msvc/release/bundle/msi/*.msi`
-
-_Linux_: Single architecture build
-
-- Detect DEB package: `src-tauri/target/release/bundle/deb/*.deb`
-- Detect AppImage: `src-tauri/target/release/bundle/appimage/*.AppImage`
-
-#### Release Build Testing
-
-```bash
-# Actual build testing (tests weread + twitter apps)
-node ./tests/release.js
-```
-
-Real build of 2 application packages to verify complete packaging flow and release.yml logic.
+If you only want the release workflow smoke test, run `node ./tests/release.js` directly.
#### Troubleshooting
@@ -332,8 +305,6 @@ Real build of 2 application packages to verify complete packaging flow and relea
- **Build failures**: Check Rust toolchain with `rustup update`
- **Permission errors**: Ensure write permissions are available
-Total: **13 tests** - all passing indicates CLI functionality is working properly. Recommend running `pnpm test` before code commits to ensure all platforms build correctly.
-
### Common Build Issues
- **Rust compilation errors**: Run `cargo clean` in `src-tauri/` directory
diff --git a/docs/advanced-usage_CN.md b/docs/advanced-usage_CN.md
index ff271aef..a1df0b86 100644
--- a/docs/advanced-usage_CN.md
+++ b/docs/advanced-usage_CN.md
@@ -169,7 +169,7 @@ pake ./my-app/index.html --name my-static-app --use-local-file
**Windows:**
-- **重要**:请先参阅 [Tauri 依赖项指南](https://tauri.app/start/prerequisites/)
+- **重要**:请先参阅 [Tauri 依赖项指南](https://v2.tauri.app/start/prerequisites/)
- Windows 10 SDK (10.0.19041.0) 和 Visual Studio Build Tools 2022 (≥17.2)
- 必需的运行库:
1. Microsoft Visual C++ 2015-2022 Redistributable (x64)
@@ -252,78 +252,51 @@ pnpm run cli:dev
### 测试指南
-统一的 CLI 构建测试套件,用于验证多平台打包功能。
+统一的 CLI 构建与发布验证指南,用于验证多平台打包功能。
#### 运行测试
```bash
# 完整测试套件(推荐)
-pnpm test # 运行完整测试套件,包含真实构建测试(8-12分钟)
+pnpm test # 构建 CLI,运行 Vitest 套件,再执行真实构建和发布流程 smoke test
-# 开发时快速测试
-pnpm test -- --no-build # 跳过构建测试,仅验证核心功能(30秒)
+# 跳过真实构建和发布流程 smoke test
+pnpm test -- --no-build
+
+# 仅运行快速 Vitest 套件
+npx vitest run
# 构建 CLI 以供测试
pnpm run cli:build
+
+# 单独运行发布流程 smoke test
+node ./tests/release.js
```
#### 🚀 完整测试套件包含
-- ✅ **单元测试**:CLI命令、参数验证、响应时间
-- ✅ **集成测试**:进程管理、文件权限、依赖解析
-- ✅ **构建器测试**:平台检测、架构检测、文件命名
-- ✅ **真实构建测试**:完整的GitHub.com应用打包验证
+- ✅ **Vitest 套件**:单元、集成、构建器和 CLI 选项覆盖
+- ✅ **真实构建 smoke test**:按平台验证实际打包流程
+- ✅ **发布流程 smoke test**:验证 popular apps 的发布构建路径
#### 测试内容详情
-**单元测试(6个)**
-
-- 版本命令 (`--version`)
-- 帮助命令 (`--help`)
-- URL 验证(有效/无效链接)
-- 参数验证(数字类型检查)
-- CLI 响应时间(<2秒)
-- Weekly URL 可访问性
-
-**集成测试(3个)**
-
-- 进程生成和管理
-- 文件系统权限检查
-- 依赖包解析验证
-
-**构建测试(3个)**
-
-- 平台检测(macOS/Windows/Linux)
-- 架构检测(Intel/ARM64)
-- 文件命名模式验证
-
-**真实构建测试(重点)**
-
-_macOS_: 🔥 多架构构建(通用二进制)
+- `pnpm test` 会运行 [`tests/index.js`](../tests/index.js) 这个主测试入口,它会:
+- 先构建 CLI,
+- 再运行 Vitest 套件,
+- 如果没有传 `--no-build`,继续执行真实构建 smoke test,
+- 然后在真实构建成功后继续执行发布流程 smoke test。
-- 编译 Intel + Apple Silicon 双架构
-- 检测 `.app` 文件生成:`GitHubMultiArch.app`
-- 备用检测:`src-tauri/target/universal-apple-darwin/release/bundle/macos/`
-- 验证通用二进制:`file` 命令检查架构
+常用可选参数:
-_Windows_: 单架构构建
+- `--no-unit`:跳过单元测试
+- `--no-integration`:跳过集成测试
+- `--no-builder`:跳过构建器测试
+- `--no-build`:跳过真实构建 smoke test 以及后续的发布流程 smoke test
+- `--e2e`:增加端到端配置测试
+- `--pake-cli`:增加 GitHub Actions 相关检查
-- 检测 EXE 文件:`src-tauri/target/x86_64-pc-windows-msvc/release/pake.exe`
-- 检测 MSI 安装包:`src-tauri/target/x86_64-pc-windows-msvc/release/bundle/msi/*.msi`
-
-_Linux_: 单架构构建
-
-- 检测 DEB 包:`src-tauri/target/release/bundle/deb/*.deb`
-- 检测 AppImage:`src-tauri/target/release/bundle/appimage/*.AppImage`
-
-#### 发布构建测试
-
-```bash
-# 实际构建测试(固定测试 weread + twitter 两个应用)
-node ./tests/release.js
-```
-
-真实构建2个应用包,验证完整的打包流程和 release.yml 逻辑是否正常工作。
+如果只想单独验证发布流程,可以直接运行 `node ./tests/release.js`。
#### 故障排除
@@ -332,8 +305,6 @@ node ./tests/release.js
- **构建失败**:检查 Rust 工具链 `rustup update`
- **权限错误**:确保有写入权限
-总计:**13 个测试**,全部通过表示 CLI 功能正常。提交代码前建议运行 `pnpm test` 确保所有平台构建正常。
-
### 常见构建问题
- **Rust 编译错误**: 在 `src-tauri/` 目录中运行 `cargo clean`
diff --git a/docs/cli-usage.md b/docs/cli-usage.md
index 1e48f0a9..0360a75f 100644
--- a/docs/cli-usage.md
+++ b/docs/cli-usage.md
@@ -467,7 +467,7 @@ pake https://chat.example.com --name ChatApp --multi-window
#### [installer-language]
-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`.
+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`.
```shell
--installer-language <language>
diff --git a/docs/cli-usage_CN.md b/docs/cli-usage_CN.md
index 356a7792..d17dd6a1 100644
--- a/docs/cli-usage_CN.md
+++ b/docs/cli-usage_CN.md
@@ -465,7 +465,7 @@ pake https://chat.example.com --name ChatApp --multi-window
#### [installer-language]
-设置 Windows 安装包语言。支持 `zh-CN`、`ja-JP`,更多在 [Tauri 文档](https://tauri.app/distribute/windows-installer/#internationalization)。默认为 `en-US`。
+设置 Windows 安装包语言。支持 `zh-CN`、`ja-JP`,更多在 [Tauri 文档](https://v2.tauri.app/distribute/windows-installer/#internationalization)。默认为 `en-US`。
```shell
--installer-language <language>