gitgrope

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetGlob

type AssetGlob struct {
	Globber glob.Glob
	Pattern string
}

func (*AssetGlob) UnmarshalYAML

func (ag *AssetGlob) UnmarshalYAML(value *yaml.Node) error

type Config

type Config struct {
	RepoSettings `yaml:",inline"`
	Repositories []*Repository `yaml:"repos"`
	LogFile      string        `yaml:"log_file"`
	Shell        string        `yaml:"task_shell"`
	PollTime     TimeSeconds   `yaml:"poll_seconds"`
	HttpTimeout  TimeSeconds   `yaml:"http_timeout"`
}

func LoadConfig

func LoadConfig(filename string) (*Config, error)

func (*Config) Apply

func (cfg *Config) Apply(logger *logrus.Logger) error

type RepoSettings

type RepoSettings struct {
	ReleaseDirectory string `yaml:"release_dir"`
	AccessToken      string `yaml:"access_token"`
	Log              *logrus.Logger
}

type Repository

type Repository struct {
	RepoSettings    `yaml:",inline"`
	Name            string `yaml:"name"` // owner/repo
	Owner           string
	Repo            string
	AssetsGlobs     []AssetGlob `yaml:"assets"`
	Tasks           []*Task     `yaml:"tasks"`
	GropeEverything bool        `yaml:"grope_everything"`
	Client          *github.Client
}

func (*Repository) FeelAndGrope

func (r *Repository) FeelAndGrope(ctx context.Context)

func (*Repository) GropeAsset

func (r *Repository) GropeAsset(ctx context.Context, asset *github.ReleaseAsset, dst string) error

type Task

type Task struct {
	Run        string `yaml:"run"`
	Name       string `yaml:"name"`
	Shell      string
	WaitSwitch string
	Log        *logrus.Logger
}

func (*Task) ExecuteFor

func (t *Task) ExecuteFor(repo *Repository, release *github.RepositoryRelease, dir, assetNameList string) bool

type TimeSeconds

type TimeSeconds struct {
	time.Duration
}

func (*TimeSeconds) UnmarshalYAML

func (ts *TimeSeconds) UnmarshalYAML(value *yaml.Node) error

Jump to

Keyboard shortcuts

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