Files
Ydisks-Xianyu-Helper/Makefile
T
Christ a99ea5c20d feat: 增加桌面端安装包与分支专用 CI/CD
拆分后台服务、浏览器安装器和桌面托盘控制器,支持 Windows Service、macOS LaunchAgent 以及 Linux systemd 部署。

新增 Windows Inno Setup 安装器、macOS Intel/Apple Silicon 通用 pkg、Linux 多架构安装脚本,并在安装过程中自动准备 Playwright Chromium。

新增仅 codex/desktop-packaging 分支触发的桌面端 CI/CD,覆盖 Go 测试、交叉编译和 Windows/macOS/Linux 安装包构建;保持现有 Docker 工作流不变。

补充数据密钥持久化、托盘图标、安装文档及相关测试。
2026-08-11 19:52:34 +08:00

58 lines
1.5 KiB
Makefile
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Ydisks-Xianyu-Helper 常用命令入口。详见各 target 注释。
GO ?= go
GOLANGCI_LINT ?= golangci-lint
.PHONY: build build-int build-browser-install build-tray test test-int vet lint cover tidy frontend fmt check
## build: 编译 server(默认,跳过 integration build tag)
build:
$(GO) build ./cmd/server
## build-browser-install: 编译独立的 Chromium 安装辅助程序
build-browser-install:
$(GO) build ./cmd/browser-install
## build-tray: 编译 Windows/macOS 菜单栏控制器(需在目标桌面系统上编译)
build-tray:
$(GO) build ./cmd/tray
## build-int: 带 integration tag 编译(含 browser 包,需要 Chromium 环境)
build-int:
$(GO) build -tags integration ./...
## test: 跑全部单元测试(默认跳过 browser 集成包)
test:
$(GO) test ./...
## test-int: 带 integration tag 跑测试(含 browser,需 Chromium)
test-int:
$(GO) test -tags integration ./...
## vet: go vet
vet:
$(GO) vet ./...
## lint: golangci-lint(需先安装:brew install golangci-lint 或见 README)
lint:
$(GOLANGCI_LINT) run ./...
## cover: 生成覆盖率报告
cover:
$(GO) test -coverprofile=cover.out ./... && $(GO) tool cover -func=cover.out | tail -1
## fmt: 格式化所有 Go 源码
fmt:
$(GO) fmt ./...
## tidy: 整理 go.mod
tidy:
$(GO) mod tidy
## frontend: 安装依赖并构建前端到 internal/webui/static/
frontend:
cd frontend && npm ci && npm run build
## check: 本地提交前全套检查(fmt + vet + lint + test)
check: fmt vet lint test