From 0fbe7cabb9881d830d46404aa3609acae2a619df Mon Sep 17 00:00:00 2001 From: yannic rieger Date: Tue, 7 Apr 2026 20:26:22 +0200 Subject: [PATCH] remove version hash exists conflict it doesn't really serve any useful purpose and is annoying when you want to update the minecraft version of a flavor without changing any of the config. --- cli/cmd/publish/plan.go | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/cli/cmd/publish/plan.go b/cli/cmd/publish/plan.go index c34a72b7..4fee6084 100644 --- a/cli/cmd/publish/plan.go +++ b/cli/cmd/publish/plan.go @@ -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 @@ -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. @@ -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{