Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh committed Jul 25, 2024
1 parent 94855f3 commit 0ed7ce1
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions cmd/embedded-cluster/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"encoding/json"
"errors"
"fmt"
"sort"

Expand All @@ -15,7 +14,6 @@ import (
"github.com/replicatedhq/embedded-cluster/pkg/addons/embeddedclusteroperator"
"github.com/replicatedhq/embedded-cluster/pkg/config"
"github.com/replicatedhq/embedded-cluster/pkg/defaults"
"github.com/replicatedhq/embedded-cluster/pkg/embed"
"github.com/replicatedhq/embedded-cluster/pkg/goods"
"github.com/replicatedhq/embedded-cluster/pkg/release"
"github.com/replicatedhq/embedded-cluster/pkg/utils"
Expand All @@ -26,17 +24,9 @@ var metadataCommand = &cli.Command{
Usage: "Print metadata about this release",
Hidden: true,
Action: func(c *cli.Context) error {
// If we are a fully realized release, we can extract the metadata from the binary
metadata, err := goods.ExtractReleaseMetadataFromSelf()
metadata, err := gatherVersionMetadata()
if err != nil {
if !errors.Is(err, embed.ErrEmbeddedDataNotFound) {
return fmt.Errorf("failed to extract version metadata: %w", err)
}
// Otherwise, we can gather the metadata from the defaults
metadata, err = gatherVersionMetadata()
if err != nil {
return fmt.Errorf("failed to gather version metadata: %w", err)
}
return fmt.Errorf("failed to gather version metadata: %w", err)
}
data, err := json.MarshalIndent(metadata, "", "\t")
if err != nil {
Expand Down

0 comments on commit 0ed7ce1

Please sign in to comment.