diff --git a/cli/pkg/release/providers/timoni.go b/cli/pkg/release/providers/timoni.go index c910bc4..c370e76 100644 --- a/cli/pkg/release/providers/timoni.go +++ b/cli/pkg/release/providers/timoni.go @@ -3,6 +3,7 @@ package providers import ( "fmt" "log/slog" + "strings" "github.com/input-output-hk/catalyst-forge/cli/pkg/events" "github.com/input-output-hk/catalyst-forge/cli/pkg/executor" @@ -48,7 +49,7 @@ func (r *TimoniReleaser) Release() error { container = fmt.Sprintf("%s-%s", r.project.Name, "deployment") } - tag := r.config.Tag + tag := strings.TrimPrefix(r.config.Tag, "v") if tag == "" { return fmt.Errorf("no tag specified") } diff --git a/cli/pkg/release/providers/timoni_test.go b/cli/pkg/release/providers/timoni_test.go index 2060158..5446849 100644 --- a/cli/pkg/release/providers/timoni_test.go +++ b/cli/pkg/release/providers/timoni_test.go @@ -57,6 +57,22 @@ func TestTimoniReleaserRelease(t *testing.T) { assert.Contains(t, calls, "mod push --version test --latest=false . oci://test.com/test") }, }, + { + name: "with v prefix", + project: newProject("test", []string{"test.com"}), + release: schema.Release{}, + config: TimoniReleaserConfig{ + Container: "test", + Tag: "v1.0.0", + }, + firing: true, + force: false, + failOn: "", + validate: func(t *testing.T, calls []string, err error) { + require.NoError(t, err) + assert.Contains(t, calls, "mod push --version 1.0.0 --latest=false . oci://test.com/test") + }, + }, { name: "no container", project: newProject("test", []string{"test.com"}),