Skip to content

Commit

Permalink
Added target to generate #153
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Dec 22, 2023
1 parent 5ea0d9d commit 12406c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/uniget/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"strings"

"github.com/spf13/cobra"
"github.com/spf13/viper"
)

var baseImage string
Expand Down Expand Up @@ -32,7 +33,7 @@ var generateCmd = &cobra.Command{
if err != nil {
return fmt.Errorf("failed to get tool %s: %w", toolName, err)
}
result = append(result, fmt.Sprintf("COPY --link --from=%s%s:%s / /", registryImagePrefix, tool.Name, strings.Replace(tool.Version, "+", "-", -1)))
result = append(result, fmt.Sprintf("COPY --link --from=%s%s:%s / /%s", registryImagePrefix, tool.Name, strings.Replace(tool.Version, "+", "-", -1), viper.GetString("target")))
}
fmt.Printf("%s", strings.Join(result, "\n"))

Expand Down

0 comments on commit 12406c4

Please sign in to comment.