config

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CliFlags = []cli.Flag{
	&cli.StringFlag{
		Name:     "token",
		Usage:    "github or gitlab token",
		EnvVars:  []string{"GITHUB_TOKEN", "GH_TOKEN", "GITLAB_TOKEN"},
		Required: true,
	},
	&cli.StringFlag{
		Name:     "slug",
		Usage:    "slug of the repository",
		EnvVars:  []string{"GITHUB_REPOSITORY", "TRAVIS_REPO_SLUG", "CI_PROJECT_PATH_SLUG"},
		Required: true,
	},
	&cli.StringFlag{
		Name:  "changelog",
		Usage: "creates a changelog file",
	},
	&cli.BoolFlag{
		Name:  "ghr",
		Usage: "create a .ghr file with the parameters for ghr",
	},
	&cli.BoolFlag{
		Name:  "noci",
		Usage: "run semantic-release locally",
	},
	&cli.BoolFlag{
		Name:  "dry",
		Usage: "do not create release",
	},
	&cli.BoolFlag{
		Name:  "vf",
		Usage: "create a .version file",
	},
	&cli.StringFlag{
		Name:  "update",
		Usage: "updates the version of a certain file",
	},
	&cli.StringFlag{
		Name:    "ghe-host",
		Usage:   "github enterprise host",
		EnvVars: []string{"GITHUB_ENTERPRISE_HOST"},
	},
	&cli.BoolFlag{
		Name:  "prerelease",
		Usage: "flags the release as a prerelease",
	},
	&cli.BoolFlag{
		Name:  "travis-com",
		Usage: "force semantic-release to use the travis-ci.com API endpoint",
	},
	&cli.StringFlag{
		Name:  "match",
		Usage: "Only consider tags matching the given glob(7) pattern, excluding the \"refs/tags/\" prefix.",
	},
	&cli.BoolFlag{
		Name:    "gitlab",
		Usage:   "run semantic-release on GitLab",
		EnvVars: []string{"GITLAB_CI"},
	},
	&cli.StringFlag{
		Name:    "gitlab-base-url",
		Usage:   "GitLab self hosted api path",
		EnvVars: []string{"CI_SERVER_URL"},
	},
	&cli.StringFlag{
		Name:    "gitlab-project-id",
		Usage:   "GitLab project unique id",
		EnvVars: []string{"CI_PROJECT_ID"},
	},
	&cli.BoolFlag{
		Name:  "allow-initial-development-versions",
		Usage: "semantic-release will start your initial development release at 0.1.0",
	},
	&cli.BoolFlag{
		Name:  "allow-no-changes",
		Value: false,
		Usage: "Exit with code 0 if no changes are found, useful if semantic-release is automatically run",
	},
}

CliFlags cli flags

Functions

This section is empty.

Types

type BetaRelease

type BetaRelease struct {
	MaintainedVersion string `json:"maintainedVersion"`
}

type Config

type Config struct {
	Token                           string
	Slug                            string
	Changelog                       string
	Ghr                             bool
	Noci                            bool
	Dry                             bool
	Vf                              bool
	Update                          string
	GheHost                         string
	Prerelease                      bool
	TravisCom                       bool
	BetaRelease                     *BetaRelease
	Match                           string
	AllowInitialDevelopmentVersions bool
	AllowNoChanges                  bool
	GitLab                          bool
	GitLabBaseURL                   string
	GitLabProjectID                 string
}

Config is a complete set of app configuration

func NewConfig

func NewConfig(c *cli.Context) (*Config, error)

NewConfig returns a new Config instance

Jump to

Keyboard shortcuts

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