-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (37 loc) · 1.54 KB
/
Copy pathMakefile
File metadata and controls
43 lines (37 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
.PHONY: selfcheck selfcheck-mysql
# 用法:
# make selfcheck
# make selfcheck MANIFEST=../content_packages/default/CN_MAINLAND/zh-CN/MBTI-CN-v0.2.2/manifest.json
selfcheck:
cd backend && ./scripts/selfcheck.sh "$(MANIFEST)"
# 用法:
# make selfcheck-mysql
# 说明:
# 需先准备本地 MySQL(127.0.0.1:3306, root/root, database=fap_ci)
selfcheck-mysql:
cd backend && \
export APP_ENV="$${APP_ENV:-ci}" && \
export DB_CONNECTION="$${DB_CONNECTION:-mysql}" && \
export DB_HOST="$${DB_HOST:-127.0.0.1}" && \
export DB_PORT="$${DB_PORT:-33306}" && \
export DB_DATABASE="$${DB_DATABASE:-fap_ci}" && \
export DB_USERNAME="$${DB_USERNAME:-root}" && \
export DB_PASSWORD="$${DB_PASSWORD:-root}" && \
export MYSQL_BOOTSTRAP="$${MYSQL_BOOTSTRAP:-1}" && \
if [ "$$MYSQL_BOOTSTRAP" = "1" ]; then bash scripts/ci/ensure_mysql.sh; fi && \
bash scripts/ci/prepare_mysql.sh && \
APP_ENV=testing php vendor/phpunit/phpunit/phpunit --configuration phpunit.mysql.xml && \
APP_ENV=testing bash scripts/ci_smoke_v0_3.sh
.PHONY: release release\:source-clean release\:verify
release\:source-clean:
bash scripts/release_pack.sh
release\:verify:
bash scripts/audit_smoke.sh dist/fap-api-release.zip
bash scripts/release_hygiene_gate.sh ./_audit/fap-api-0212-5/
release:
@$(MAKE) release:source-clean
@$(MAKE) release:verify
@echo "[release] artifact=dist/fap-api-release.zip"
@echo "[release] commit_sha=$$(git rev-parse --short=12 HEAD)"
@echo "[release] generated_at_utc=$$(date -u +%Y-%m-%dT%H:%M:%SZ)"
@echo "[release] build_host=$$(uname -srm)"