From f5320aaae25ded0ffb20defb3e7f0f6de62666e4 Mon Sep 17 00:00:00 2001 From: literat Date: Mon, 14 Oct 2024 11:48:58 +0200 Subject: [PATCH] Chore(ci): Use `dist-tag` only if it is present in command --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 40eecec6f6..0b596769b4 100644 --- a/Makefile +++ b/Makefile @@ -108,8 +108,12 @@ publish: ## Publish packages to repository, pass the parameter "pkg=" to publish else publish: @$(eval pkg ?=) - @$(eval dist-tag ?= latest) - $(PKG_EXECUTE) $(MONOREPO_TOOL) publish dist-tag=$(dist-tag) from-package --yes $(MONOREPO_TOOL_FLAGS) + @$(eval dist-tag := $(strip $(dist-tag))) + @if [ -n "$(dist-tag)" ]; then \ + $(PKG_EXECUTE) $(MONOREPO_TOOL) publish dist-tag=$(dist-tag) from-package --yes $(MONOREPO_TOOL_FLAGS); \ + else \ + $(PKG_EXECUTE) $(MONOREPO_TOOL) publish from-package --yes $(MONOREPO_TOOL_FLAGS); \ + fi endif ## —— Miscellaneous 🛠️ ——————————————————————————————————————————————————————————————