Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cli/pkg/release/providers/timoni.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
}
Expand Down
16 changes: 16 additions & 0 deletions cli/pkg/release/providers/timoni_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"}),
Expand Down