增加本地推送前代码检查钩子
This commit is contained in:
@@ -50,6 +50,18 @@ npm run dev
|
||||
|
||||
`./scripts/deploy-prod.sh` 在构建镜像前会自动调用 `check.sh`(本地有 `go` 和 `npm` 时)。检查未通过会中止部署;确需跳过用 `--skip-check`(不推荐)。`check.sh` 也支持 `--skip-backend`、`--skip-frontend`、`--skip-tests` 做局部调试。
|
||||
|
||||
需要在本地推送前自动执行同一套检查时,启用 Git hook:
|
||||
|
||||
```bash
|
||||
bash scripts/install-git-hooks.sh
|
||||
```
|
||||
|
||||
启用后,`git push` 会执行 `scripts/check.sh`;仅临时跳过时使用:
|
||||
|
||||
```bash
|
||||
SKIP_CHECKS=1 git push
|
||||
```
|
||||
|
||||
## 开发态短信与实名
|
||||
|
||||
- 后端日志使用单行可读文本。开发环境同时输出控制台和 `backend/logs/app-YYYY-MM-DD.log`,生产示例只输出文件以避免重复存储;可通过 `LOG_LEVEL=debug|info|warn|error` 调整级别。
|
||||
|
||||
Reference in New Issue
Block a user