From 262e352e81a5f14ca9d94e79d1675083b5e2760e Mon Sep 17 00:00:00 2001 From: Mauro Morales Date: Thu, 7 Dec 2023 11:55:28 +0100 Subject: [PATCH] Remove variant from base tag --- versioneer/base_name_test.go | 2 +- versioneer/versioneer.go | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/versioneer/base_name_test.go b/versioneer/base_name_test.go index 4fc5c4f0..558b408e 100644 --- a/versioneer/base_name_test.go +++ b/versioneer/base_name_test.go @@ -28,7 +28,7 @@ var _ = Describe("BaseContainerName", func() { BeforeEach(func() { id = "master" registryAndOrg = "quay.io/kairos" - expectedName = "quay.io/kairos/opensuse:leap-15.5-standard-amd64-generic-master" + expectedName = "quay.io/kairos/opensuse:leap-15.5-amd64-generic-master" }) It("returns the name", func() { name, err := artifact.BaseContainerName(registryAndOrg, id) diff --git a/versioneer/versioneer.go b/versioneer/versioneer.go index 41646bb1..16738285 100644 --- a/versioneer/versioneer.go +++ b/versioneer/versioneer.go @@ -139,7 +139,14 @@ func (a *Artifact) BaseContainerName(registryAndOrg, id string) (string, error) } func (a *Artifact) BaseTag() (string, error) { - return a.commonName() + if err := a.Validate(); err != nil { + return "", err + } + + result := fmt.Sprintf("%s-%s-%s", + a.FlavorRelease, a.Arch, a.Model) + + return result, nil } func (a *Artifact) Tag() (string, error) {