command

package
v0.0.0-...-706cb20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Package = cli.Command{
	Name: "package",
	Flags: []cli.Flag{
		&cli.StringSliceFlag{Name: "file", Aliases: []string{"f"}, FilePath: "files to package", Required: true},
		&cli.StringFlag{Name: "licence", FilePath: "the licence to apply to the packages"},
		&cli.StringFlag{Name: "vendor", FilePath: "the vendor to apply to the packages"},
		&cli.StringFlag{Name: "bucket", FilePath: "the S3 bucket to store releases in"},
		&cli.StringFlag{Name: "channel", FilePath: "the release channel to use", Required: true},
		&cli.PathFlag{Name: "out", FilePath: "output directory", Required: true},
	},
	Action: func(c *cli.Context) error {
		ctx := c.Context

		cfg, err := config.LoadDefaultConfig(ctx)
		if err != nil {
			return err
		}

		p := packager.Packager{
			OutputFolder: c.Path("out"),
			Licence:      c.String("licence"),
			Vendor:       c.String("vendor"),
			Channel:      c.String("channel"),
			Files:        c.StringSlice("file"),
			S3Client:     s3.NewFromConfig(cfg),
			Bucket:       c.String("bucket"),
			Description:  c.String("description"),
		}

		return p.Package(ctx)
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL