From e332ce9bb02ac01a99b96362fe66f5e2e1f21e44 Mon Sep 17 00:00:00 2001 From: Matt Bush Date: Sun, 24 Mar 2024 17:18:24 -0700 Subject: [PATCH] Allow env var to always publish Signed-off-by: Matt Bush --- makelib/xpkg.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/makelib/xpkg.mk b/makelib/xpkg.mk index b8d19f4..3ad5124 100644 --- a/makelib/xpkg.mk +++ b/makelib/xpkg.mk @@ -116,9 +116,13 @@ else build.artifacts.platform: do.skip.xpkgs endif -# only publish package for main / master and release branches -# TODO(hasheddan): remove master and support overriding -ifneq ($(filter main master release-%,$(BRANCH_NAME)),) +# only publish package for main / master and release branches, unless the DO_PUBLISH override is set to true +DO_PUBLISH ?= false +ifneq ($(filter main release-%,$(BRANCH_NAME)),) +DO_PUBLISH = true +endif + +ifeq ($(DO_PUBLISH),true) publish.artifacts: $(foreach r,$(XPKG_REG_ORGS), $(foreach x,$(XPKGS),xpkg.release.publish.$(r).$(x))) endif