From c1f1690b8dd4a0719390c6e099662f1510a865c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Fri, 13 Nov 2020 16:46:17 -0500 Subject: [PATCH 1/2] chore: prompt maintainer to quit make watch before publish --- Makefile | 5 ++--- scripts/publish.sh | 11 +++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 scripts/publish.sh diff --git a/Makefile b/Makefile index 6e8f5d14d9cf..51c8f9304827 100644 --- a/Makefile +++ b/Makefile @@ -243,9 +243,8 @@ new-version: $(YARN) release-tool version $(FORCE_PUBLISH) # NOTE: Run make new-version first -publish: prepublish - $(YARN) release-tool publish - $(MAKE) clean +publish: + bash ./scripts/publish.sh check-yarn-bug-1882: ifneq ("$(shell grep 3155328e5 .yarn/releases/yarn-*.cjs -c)", "0") diff --git a/scripts/publish.sh b/scripts/publish.sh new file mode 100644 index 000000000000..1b9f58adad04 --- /dev/null +++ b/scripts/publish.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +echo "Please confirm you have stopped \`make watch\`. (y)es, [N]o: " + +read CLEAR; + +if [ "_$CLEAR" == "_y" ]; then + make prepublish + yarn release-tool publish + make clean +fi From f47e4c66dea30e3c84b484fa6d670a64929d2186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Fri, 13 Nov 2020 17:29:11 -0500 Subject: [PATCH 2/2] move shell prompt to Makefile --- Makefile | 9 ++++++++- scripts/publish.sh | 11 ----------- 2 files changed, 8 insertions(+), 12 deletions(-) delete mode 100644 scripts/publish.sh diff --git a/Makefile b/Makefile index 51c8f9304827..530398a9365a 100644 --- a/Makefile +++ b/Makefile @@ -244,7 +244,14 @@ new-version: # NOTE: Run make new-version first publish: - bash ./scripts/publish.sh + @echo "Please confirm you have stopped make watch. (y)es, [N]o:"; \ + read CLEAR; \ + if [ "_$$CLEAR" != "_y" ]; then \ + exit 1; \ + fi + $(MAKE) prepublish + $(YARN) release-tool publish + $(MAKE) clean check-yarn-bug-1882: ifneq ("$(shell grep 3155328e5 .yarn/releases/yarn-*.cjs -c)", "0") diff --git a/scripts/publish.sh b/scripts/publish.sh deleted file mode 100644 index 1b9f58adad04..000000000000 --- a/scripts/publish.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -echo "Please confirm you have stopped \`make watch\`. (y)es, [N]o: " - -read CLEAR; - -if [ "_$CLEAR" == "_y" ]; then - make prepublish - yarn release-tool publish - make clean -fi