This section is empty.


View Source
var UpdateWithOmaha = &subcommands.Command{
	UsageLine: `update-with-omaha [FLAGS...] -output_json /path/to/output.json`,
	ShortDesc: "update stable version with omaha files",
	LongDesc: `update stable vesrion with omaha json file in GS.

This command is for builder to get up-to-date stable version from omaha file in GS,
and commit them to stable version config file.
Do not use this command as part of scripts or pipelines as it's unstable.

Output is JSON encoded protobuf defined at`,
	CommandRun: func() subcommands.CommandRun {
		c := &updateWithOmahaRun{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.Flags.StringVar(&c.outputPath, "output_json", "", "Path where JSON encoded lab_platform.StableVersions should be written.")
		c.Flags.BoolVar(&c.dryRun, "dryrun", false, "indicate if it's a dryrun for stable version update")

		return c

    UpdateWithOmaha subcommand: read stable version in omaha json file in GS.


    func FileBuilder

    func FileBuilder(
    	ctx context.Context,
    	oldSV *sv.StableVersions,
    	newSV []*sv.StableCrosVersion,
    	fvFunc FirmwareVersionFunc,
    ) (*sv.StableVersions, error)

      FileBuilder takes the old file, the new CrOS entries from Omaha, a Google Storage client, and an output directory and returns the new stable version file.


      type FirmwareVersionFunc

      type FirmwareVersionFunc func(
      	ctx context.Context,
      	board string,
      	version string,
      ) ([]*sv.StableFirmwareVersion, error)

        FirmwareVersionFunc is a type that takes a board and version and returns a firmware version

        func MakeFirmwareVersionFunc

        func MakeFirmwareVersionFunc(gsc gslibClient, outDir string) FirmwareVersionFunc

          MakeFirmwareVersionFunc takes a gslibClient and a temporary directory and returns a function that can convert a board and version into stable firmware versions.