Skip to content
Merged
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
28 changes: 0 additions & 28 deletions cli/cmd/publish/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,6 @@ func (c versionExistConflict) Print() {
fmt.Printf("%s - A Flavor with version %s already exists.\n", indent2, c.flavor.version)
}

type versionHashExistsConflict struct {
flavor localFlavor
}

func (c versionHashExistsConflict) Flavor() localFlavor {
return c.flavor
}

func (c versionHashExistsConflict) Print() {
fmt.Printf("%s - A version with the same set of files exist.\n", indent2)
}

type errorConflict struct {
flavor localFlavor
err error
Expand Down Expand Up @@ -188,11 +176,6 @@ func newPlan(logger *slog.Logger, cfg publishConfig, supportedVersions []string,
// is to be considered "changed"

if remoteVersion == nil {
if c := checkHashes(local, remote); c != nil { // TODO: remove
p.conflicts = append(p.conflicts, c)
continue
}

// if the remote version has not been created yet, BUT
// there are previous versions present, it means that
// this flavor has changed.
Expand Down Expand Up @@ -402,17 +385,6 @@ func (p plan) print() {
fmt.Println(Reset)
}

func checkHashes(local localFlavor, remote *chunkv1alpha1.Flavor) conflict {
if found := slices.ContainsFunc(remote.Versions, func(v *chunkv1alpha1.FlavorVersion) bool {
return local.hash == v.Hash
}); found {
return versionHashExistsConflict{
flavor: local,
}
}
return nil
}

//func test() {
// p := plan{
// addedFlavors: []localFlavor{
Expand Down
Loading