From d1210daa029781ba354dc74bd56203925f6b0c9f Mon Sep 17 00:00:00 2001 From: Scott Andrews Date: Wed, 9 Sep 2026 17:25:12 -0400 Subject: [PATCH] Publish debug components in same oci repo The debug components were published at the same version in a sibling repository. ghcr.io/componentized/http/foo.debug vs ghcr.io/componentized/http/foo. Now both components are published to the same repository, with the debug component's version augmented with `+debug`. Since OCI tags cannot contain `+`, this value is converted to `_`, which is consistent with how wasm.directory handles semver oci tags. Signed-off-by: Scott Andrews --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 150ffbd..8abba95 100644 --- a/Makefile +++ b/Makefile @@ -65,10 +65,11 @@ ifndef REPOSITORY $(error REPOSITORY is undefined) endif @$(eval FILE := $(@:publish-%=%)) - @$(eval COMPONENT := $(FILE:%.wasm=%)) + @$(eval COMPONENT := $(if $(filter %.debug.wasm,$(FILE)),$(FILE:%.debug.wasm=%) (debug),$(FILE:%.wasm=%))) @$(eval DESCRIPTION := $(shell head -n 3 "lib/${FILE}.md" | tail -n 1)) @$(eval REVISION := $(shell git rev-parse HEAD)$(shell git diff --quiet HEAD && echo "+dirty")) - @$(eval TAG := $(patsubst v%,%,$(subst +,_,$(VERSION)))) + @$(eval COMPONENT_VERSION := $(if $(filter %.debug.wasm,$(FILE)),${VERSION}+debug,${VERSION})) + @$(eval TAG := $(patsubst v%,%,$(subst +,_,$(COMPONENT_VERSION)))) @$(eval IMAGE := $(if $(filter interface.wasm,$(FILE)),${REPOSITORY}:${TAG},${REPOSITORY}/${COMPONENT}:${TAG})) @echo "::group::${FILE} -> ${IMAGE}" @@ -76,7 +77,7 @@ endif wkg oci push \ --annotation "org.opencontainers.image.title=${COMPONENT}" \ --annotation "org.opencontainers.image.description=${DESCRIPTION}" \ - --annotation "org.opencontainers.image.version=${VERSION}" \ + --annotation "org.opencontainers.image.version=${COMPONENT_VERSION}" \ --annotation "org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY}.git" \ --annotation "org.opencontainers.image.revision=${REVISION}" \ --annotation "org.opencontainers.image.licenses=Apache-2.0" \