Skip to content

Commit

Permalink
Chore(ci): Use dist-tag only if it is present in command
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Oct 14, 2024
1 parent 880d8f6 commit b62d599
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 🛠️ ——————————————————————————————————————————————————————————————
Expand Down

0 comments on commit b62d599

Please sign in to comment.