@@ -8,7 +8,7 @@ PACKAGES := $(patsubst packages/%/Makefile,%,$(wildcard packages/*/Makefile))
88# The per-package targets are deliberately not .PHONY: make skips the implicit
99# rule search for phony targets, which would leave the pattern rules unmatched.
1010# No file is ever named after them, so they always run.
11- .PHONY : install test test-release test-load check-publish-auth check-publish publish
11+ .PHONY : install test test-release test-load check-publish
1212
1313install :
1414 $(BUN ) install
@@ -24,41 +24,12 @@ test-load: $(PACKAGES:%=test-load-%)
2424test-load-% :
2525 $(MAKE ) -C packages/$* test-load OPENCODE=" $( OPENCODE) "
2626
27- check-publish-auth :
28- @if ! $(NPM ) whoami > /dev/null 2>&1 ; then \
29- echo " npm authentication is missing or expired; starting login..." ; \
30- $(NPM ) login || exit $$? ; \
31- fi
32- @identity=" $$ ( $( NPM) whoami 2>/dev/null )" || { \
33- echo " Cannot publish: npm authentication still failed after login." >&2 ; \
34- exit 1; \
35- }; \
36- echo " npm authenticated as $$ identity"
37-
38- # The registry rejects a version it already has, so a release that only bumps
39- # one package publishes that one alone: make publish-reviewer. Publishing every
40- # package remains available for a release that bumps all of them. Check every
41- # version before publishing any package to avoid a partial release.
27+ # Check which workspace versions are not yet present in the npm registry.
4228check-publish :
4329 @for package in $(PACKAGES ) ; do \
4430 $(NODE ) scripts/check-publish-version.mjs packages/$$ package " $( NPM) " --aggregate; status=$$? ; \
4531 if [ $$ status -ne 0 ] && [ $$ status -ne 3 ]; then exit $$ status; fi ; \
4632 done
4733
48- publish : check-publish-auth test test-load
49- @candidates=" " ; \
50- for package in $( PACKAGES) ; do \
51- $(NODE ) scripts/check-publish-version.mjs packages/$$ package " $( NPM) " --aggregate; status=$$? ; \
52- if [ $$ status -eq 0 ]; then candidates=" $$ candidates $$ package" ; \
53- elif [ $$ status -ne 3 ]; then exit $$ status; fi ; \
54- done ; \
55- if [ -z " $$ candidates" ]; then echo " No unpublished package versions to publish." ; exit 0; fi ; \
56- for package in $$ candidates; do \
57- $(MAKE ) -C packages/$$ package publish || exit $$? ; \
58- done
59-
6034check-publish-% :
6135 $(NODE ) scripts/check-publish-version.mjs packages/$* " $( NPM) "
62-
63- publish-% : check-publish-auth check-publish-% test test-load-%
64- $(MAKE ) -C packages/$* publish
0 commit comments