diff --git a/internal/forgejo/repo.go b/internal/forgejo/repo.go index c65eb9d..4bb5922 100644 --- a/internal/forgejo/repo.go +++ b/internal/forgejo/repo.go @@ -465,9 +465,6 @@ func (rm *RepoManager) PublishDeliveryBranch(sourceDir, sourceBranch, repoURL, d if err := runGit("", os.Environ(), "clone", "--no-local", "--branch", sourceBranch, sourceDir, temporary); err != nil { return err } - if err := generate(temporary); err != nil { - return err - } cleanupAskPass, environment, err := rm.gitEnvironment() if err != nil { return err @@ -476,6 +473,12 @@ func (rm *RepoManager) PublishDeliveryBranch(sourceDir, sourceBranch, repoURL, d if err := runGit(temporary, environment, "checkout", "-B", deliveryBranch); err != nil { return err } + if err := os.RemoveAll(filepath.Join(temporary, ".tekton")); err != nil { + return err + } + if err := generate(temporary); err != nil { + return err + } if err := runGit(temporary, environment, "add", ".tekton"); err != nil { return err }