Strip leading v from Docker Hub tags and in-container version - #15
Merged
Conversation
_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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_build-variant.ymlwas passinginputs.version(the raw Git ref, e.g.v1.1.2) straight through to both the Docker Hub tag and theCONTAINER_VERSIONbuild-arg, so images were pushed asthrowtheswitch/madsciencelab:v1.1.2instead of:1.1.2, and the in-container welcome banner showedv1.1.2too.build.sh --version,CONTAINER_VERSIONbuild-arg, Docker tag) through its stripped output instead ofinputs.versiondirectly.ci.ymlpassesversion: dev(novto strip) so it's unaffected.Test plan
v1.1.2→1.1.2,v1.1.2a→1.1.2a,v1.1.2a-pre.1→1.1.2a-pre.1,v1.1.2-pre.1→1.1.2-pre.1,dev→devCONTAINER_VERSIONbuild-arg — to be tested separately, tag will be deleted afterwardrelease.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