-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 1.04 KB
/
Copy pathMakefile
File metadata and controls
35 lines (26 loc) · 1.04 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
BUN ?= bun
NODE ?= node
NPM ?= npm
OPENCODE ?= $(HOME)/.bun/bin/opencode2
PACKAGES := $(patsubst packages/%/Makefile,%,$(wildcard packages/*/Makefile))
# The per-package targets are deliberately not .PHONY: make skips the implicit
# rule search for phony targets, which would leave the pattern rules unmatched.
# No file is ever named after them, so they always run.
.PHONY: install test test-release test-load check-publish
install:
$(BUN) install
test: test-release
$(BUN) run --filter '*' test
test-release:
$(NODE) --test scripts/release-metadata.test.mjs
test-load: $(PACKAGES:%=test-load-%)
test-load-%:
$(MAKE) -C packages/$* test-load OPENCODE="$(OPENCODE)"
# Check which workspace versions are not yet present in the npm registry.
check-publish:
@for package in $(PACKAGES); do \
$(NODE) scripts/check-publish-version.mjs packages/$$package "$(NPM)" --aggregate; status=$$?; \
if [ $$status -ne 0 ] && [ $$status -ne 3 ]; then exit $$status; fi; \
done
check-publish-%:
$(NODE) scripts/check-publish-version.mjs packages/$* "$(NPM)"