Skip to content

Strip leading v from Docker Hub tags and in-container version - #15

Merged
mkarlesky merged 1 commit into
masterfrom
fix-docker-tag-v-prefix
Aug 19, 2026
Merged

Strip leading v from Docker Hub tags and in-container version#15
mkarlesky merged 1 commit into
masterfrom
fix-docker-tag-v-prefix

Conversation

@mkarlesky

Copy link
Copy Markdown
Member

Summary

  • _build-variant.yml was passing inputs.version (the raw Git ref, e.g. v1.1.2) straight through to both the Docker Hub tag and the CONTAINER_VERSION build-arg, so images were pushed as throwtheswitch/madsciencelab:v1.1.2 instead of :1.1.2, and the in-container welcome banner showed v1.1.2 too.
  • Adds a single "Compute image version (strip leading v)" step at the top of the job and routes all three consumers (build.sh --version, CONTAINER_VERSION build-arg, Docker tag) through its stripped output instead of inputs.version directly.
  • ci.yml passes version: dev (no v to strip) so it's unaffected.

Test plan

  • YAML parses cleanly
  • Hand-traced the strip against every real version string: v1.1.21.1.2, v1.1.2a1.1.2a, v1.1.2a-pre.11.1.2a-pre.1, v1.1.2-pre.11.1.2-pre.1, devdev
  • Push a throwaway prerelease tag and confirm the build logs show the stripped version in both the Docker tag and CONTAINER_VERSION build-arg — to be tested separately, tag will be deleted afterward
  • release.yml's real Docker Hub push path stays unexercised live (same standing decision as prior PRs, to avoid touching production :latest) — verified by code reading, since the fix is shared logic via _build-variant.yml

🤖 Generated with Claude Code

_build-variant.yml passed inputs.version straight through to both the
Docker Hub tag and the CONTAINER_VERSION build-arg (baked in as
MADSCIENCELAB_VERSION, shown in the container's welcome banner).
release.yml/prerelease.yml pass the raw v-prefixed Git tag (e.g. v1.1.2),
so images were pushed as e.g. throwtheswitch/madsciencelab:v1.1.2 instead
of :1.1.2 — the v prefix is a Git tag/GitHub release convention only and
was never meant to appear in Docker Hub tags or the version banner, which
follow this repo's pre-existing no-v convention (e.g. 1.1.2a).

Strip it once at the top of the job so both consumers stay in sync.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mkarlesky
mkarlesky merged commit 8a4b756 into master Aug 19, 2026
9 checks passed
@mkarlesky
mkarlesky deleted the fix-docker-tag-v-prefix branch August 19, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant