feat: add Windows support + multi-platform GitHub Actions release#25
Open
lk19940215 wants to merge 3 commits into
Open
feat: add Windows support + multi-platform GitHub Actions release#25lk19940215 wants to merge 3 commits into
lk19940215 wants to merge 3 commits into
Conversation
- Add GitHub Actions workflow (.github/workflows/release.yml) that builds binaries for darwin-arm64, darwin-amd64, linux-amd64, windows-amd64 - Add process_unix.go / process_windows.go for platform-specific process management (daemon detach, terminate, kill, liveness check) - Add service_windows.go for Windows service management via NSSM - Update daemon.go to use platform-abstracted helpers instead of direct Unix syscalls (Setpgid, SIGTERM, SIGKILL, Signal(0)) - Update credentials.go to support Windows/Linux JoyCode IDE state paths and fix SQLite URI encoding for Windows backslash paths All 4 platforms verified with CGO_ENABLED=0 cross-compilation. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
用 opus 4.6 thinkings ,支持 windows 、macos intel 。 AI 弄得,代码做了AI复审 |
- Fix SQLite URI for Windows drive letter paths (C:\... → /C:/...) - Fix workflow_dispatch to checkout tag commit instead of HEAD - Fix service_windows.go MkdirAll error handling - Update service.go description to include Windows (NSSM) Co-authored-by: Cursor <cursoragent@cursor.com>
rootCmd has SilenceErrors: true which suppresses cobra default error output. The main function was calling os.Exit(1) without printing the error, causing users to see silent failures on credential validation. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
新增 Windows 和 macOS Intel 跨平台支持,并添加 GitHub Actions CI/CD 流水线实现自动化多平台构建与发布。
变更内容
GitHub Actions 发布工作流 (
.github/workflows/release.yml)v*)或手动workflow_dispatchWindows 进程管理 (
process_unix.go,process_windows.go)daemon.go中的 Unix 特定系统调用(Setpgid、SIGTERM、SIGKILL、Signal(0))提取到平台特定文件,使用 build tags 隔离CREATE_NEW_PROCESS_GROUP、taskkill /T、OpenProcessWindows 服务管理 (
service_windows.go)installService、uninstallService、serviceStatus跨平台凭据检测 (
credentials.go)LoadFromSystem()支持 Windows(%APPDATA%)和 Linux(~/.config)路径C:\...→file:/C:/...)Bug 修复 (
main.go)SilenceErrors: true导致静默退出)已测试平台
向后兼容性
process_unix.go完整保留daemon.go调用相同函数签名,仅通过 build tags 分发测试计划
--help、serve、whoami命令验证通过