-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (37 loc) · 1.46 KB
/
Copy pathMakefile
File metadata and controls
39 lines (37 loc) · 1.46 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
# --- shipiru ---------------------------------------------------------------
SHIPIRU ?= $(HOME)/projects/shipiru-diy/bin/shipiru
.PHONY: deploy indexnow logs restart rollback
# A successful deploy then tells the IndexNow engines (Bing and others) which
# pages are new or changed; see scripts/indexnow.mjs.
deploy:
$(SHIPIRU) deploy reactmarkdownkit
node scripts/indexnow.mjs
indexnow:
node scripts/indexnow.mjs
logs:
$(SHIPIRU) logs reactmarkdownkit
restart:
$(SHIPIRU) restart reactmarkdownkit
rollback:
$(SHIPIRU) rollback reactmarkdownkit $(TAG)
# --- npm ------------------------------------------------------------------
# `make publish` releases every public package under packages/ and plugins/.
# pnpm skips versions the registry already has, so bump the version in each
# package.json first; `make publish OTP=123456` passes a 2FA code through and
# `NPM_TAG=next` publishes under a dist-tag instead of `latest`.
PNPM ?= pnpm
PUBLISHABLE = --filter './packages/*' --filter './plugins/*'
PUBLISH_FLAGS = $(if $(OTP),--otp $(OTP)) $(if $(NPM_TAG),--tag $(NPM_TAG))
.PHONY: build check publish-dry publish
build:
$(PNPM) install --frozen-lockfile
$(PNPM) build
check: build
$(PNPM) typecheck
$(PNPM) test
$(PNPM) pack:check
publish-dry: build
$(PNPM) -r $(PUBLISHABLE) publish --dry-run --no-git-checks $(PUBLISH_FLAGS)
publish: check
@npm whoami >/dev/null 2>&1 || { echo "Not logged in to npm. Run: npm login"; exit 1; }
$(PNPM) -r $(PUBLISHABLE) publish $(PUBLISH_FLAGS)