Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87ebd74daf | ||
|
|
39d02db187 |
2
Makefile
2
Makefile
@@ -4,7 +4,7 @@ PKG = github.com/qlik-oss/sense-installer
|
||||
MAKE_OPTS ?= --no-print-directory
|
||||
|
||||
LDFLAGS = -w -X $(PKG)/pkg.Version=$(VERSION) -X $(PKG)/pkg.Commit=$(COMMIT) -X "$(PKG)/pkg.CommitDate=$(COMMIT_DATE)"
|
||||
XBUILD = CGO_ENABLED=0 go build -a -tags netgo -ldflags $(LDFLAGS)
|
||||
XBUILD = CGO_ENABLED=0 go build -a -tags netgo -ldflags '$(LDFLAGS)'
|
||||
BINDIR = bin
|
||||
|
||||
COMMIT ?= $(shell git rev-parse --short HEAD)
|
||||
|
||||
@@ -7,16 +7,27 @@ import (
|
||||
|
||||
func pullQliksenseImages(q *qliksense.Qliksense) *cobra.Command {
|
||||
var (
|
||||
cmd *cobra.Command
|
||||
cmd *cobra.Command
|
||||
opts *aboutOptions
|
||||
)
|
||||
opts = &aboutOptions{}
|
||||
|
||||
cmd = &cobra.Command{
|
||||
Use: "pull",
|
||||
Short: "Pull docke images for offline install",
|
||||
Example: ` qliksense pull`,
|
||||
Example: `qliksense pull`,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return q.PullImages()
|
||||
return q.PullImages(opts.getTagDefaults(args))
|
||||
},
|
||||
}
|
||||
|
||||
f := cmd.Flags()
|
||||
f.StringVarP(&opts.Version, "version", "v", "latest",
|
||||
"From version of Qlik Sense The images will be pulled")
|
||||
f.StringVarP(&opts.Tag, "tag", "t", "",
|
||||
"Use a bundle in an OCI registry specified by the given tag")
|
||||
f.StringVarP(&opts.File, "file", "f", "",
|
||||
"Path to the porter manifest file. Defaults to the bundle in the current directory.")
|
||||
f.StringVar(&opts.CNABFile, "cnab-file", "",
|
||||
"Path to the CNAB bundle.json file.")
|
||||
return cmd
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ type Images struct {
|
||||
}
|
||||
|
||||
// PullImages ...
|
||||
func (p *Qliksense) PullImages() error {
|
||||
func (p *Qliksense) PullImages(args []string) error {
|
||||
var (
|
||||
image string
|
||||
err error
|
||||
@@ -35,8 +35,8 @@ func (p *Qliksense) PullImages() error {
|
||||
valid bool
|
||||
images Images
|
||||
)
|
||||
|
||||
if yamlVersion, err = p.CallPorter([]string{"invoke", "--action", "about"},
|
||||
println("getting images list...")
|
||||
if yamlVersion, err = p.CallPorter(append([]string{"invoke", "--action", "about"}, args...),
|
||||
func(x string) (out *string) {
|
||||
if strings.HasPrefix(x, "qlikSenseVersion") {
|
||||
valid = true
|
||||
|
||||
Reference in New Issue
Block a user