gh2gcs

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadReleases

func DownloadReleases(releaseCfg *ReleaseConfig, ghClient *github.GitHub, outputDir string) error

DownloadReleases downloads release assets to a local directory Assets to download are derived from the tags specified in `ReleaseConfig`.

func Upload

func Upload(cfg *ReleaseConfig, ghClient *github.GitHub, outputDir string) error

Upload copies a set of release assets from local directory to GCS Assets to upload are derived from the tags specified in `ReleaseConfig`.

Types

type Config

type Config struct {
	ReleaseConfigs []ReleaseConfig `yaml:"releaseConfigs"`
}

Config contains a slice of `ReleaseConfig` to be used when unmarshalling a yaml config containing multiple repository configs.

type ReleaseConfig

type ReleaseConfig struct {
	// GitHub options
	Org                string   `yaml:"org"`
	Repo               string   `yaml:"repo"`
	Tags               []string `yaml:"tags"`
	IncludePrereleases bool     `yaml:"includePrereleases"`

	// GCS options
	GCSBucket  string `yaml:"gcsBucket"`
	ReleaseDir string `yaml:"releaseDir"`
}

ReleaseConfig contains source (GitHub) and destination (GCS) information to perform a copy/upload operation using gh2gcs.

Jump to

Keyboard shortcuts

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