mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-09-18 06:34:54 +08:00
fix(release):完善当前分发证明与质量门禁
This commit is contained in:
@@ -118,14 +118,19 @@ lint-rust: ## Rust Clippy 检查
|
||||
@echo "$(BLUE)Running Clippy...$(NC)"
|
||||
cargo clippy --workspace --all-targets -- -D warnings
|
||||
|
||||
lint-go: ## Go Linter 检查
|
||||
lint-go: ## Go Linter 检查(required)
|
||||
@echo "$(BLUE)Running golangci-lint...$(NC)"
|
||||
@command -v golangci-lint >/dev/null 2>&1 || { echo "$(YELLOW)OPTIONAL gate skipped: golangci-lint is not installed$(NC)"; exit 0; }
|
||||
@if [ -n "$$(go list ./... 2>/dev/null)" ]; then \
|
||||
XDG_CACHE_HOME="$${XDG_CACHE_HOME:-/tmp/bat-xdg-cache}" golangci-lint run ./...; \
|
||||
else \
|
||||
echo "$(YELLOW)No Go packages yet, skipping...$(NC)"; \
|
||||
fi
|
||||
@. scripts/ci-versions.sh; \
|
||||
command -v golangci-lint >/dev/null 2>&1 || { \
|
||||
echo "$(YELLOW)required gate failed: golangci-lint $${GOLANGCI_LINT_VERSION} is not installed$(NC)"; \
|
||||
exit 1; \
|
||||
}; \
|
||||
actual="$$(golangci_lint_actual_version)"; \
|
||||
test "$${actual}" = "$${GOLANGCI_LINT_VERSION}" || { \
|
||||
echo "$(YELLOW)required gate failed: golangci-lint version required=$${GOLANGCI_LINT_VERSION} actual=$${actual:-unknown}$(NC)"; \
|
||||
exit 1; \
|
||||
}; \
|
||||
XDG_CACHE_HOME="$${XDG_CACHE_HOME:-/tmp/bat-xdg-cache}" golangci-lint run ./...
|
||||
|
||||
# ============================================================================
|
||||
# 清理
|
||||
@@ -191,7 +196,7 @@ docs: ## 生成文档
|
||||
# CI/CD
|
||||
# ============================================================================
|
||||
|
||||
ci-check: ## 运行只读 required CI 门禁(可选 lint 会明确标记)
|
||||
ci-check: ## 运行只读 required CI 门禁(含固定版本 Go lint)
|
||||
@bash scripts/ci-check.sh
|
||||
|
||||
ci: ci-check ## 运行只读 CI 检查(兼容旧命令名)
|
||||
|
||||
Reference in New Issue
Block a user