Documentation ¶
Index ¶
- func IsReleaseVersionDifferent(d deploy.Deployment, buildVersion string, ignoreMismatch bool) (isDifferent bool, isBuildGreater bool, err error)
- func PreventDevUsage() cli.BeforeFunc
- func RequireAWSCredentials() cli.BeforeFunc
- func RequireCleanGitWorktree() cli.BeforeFunc
- func RequireDeploymentConfig() cli.BeforeFunc
- func ShouldShowHelp(c *cli.Context) bool
- func VerifyGDeployCompatibility() cli.BeforeFunc
- func WithBeforeFuncs(cmd *cli.Command, funcs ...cli.BeforeFunc) *cli.Command
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsReleaseVersionDifferent ¶
func IsReleaseVersionDifferent(d deploy.Deployment, buildVersion string, ignoreMismatch bool) (isDifferent bool, isBuildGreater bool, err error)
Validate if the passed deployment configuration's release value and gdeploy version matches or not. Returns true if version same. Returns false if we can skip this check. Returns error for anything else.
func PreventDevUsage ¶
func PreventDevUsage() cli.BeforeFunc
func RequireAWSCredentials ¶
func RequireAWSCredentials() cli.BeforeFunc
RequireAWSCredentials attempts to load aws credentials, if they don't exist, iot returns a clio.CLIError This function will set the AWS config in context under the key cfaws.AWSConfigContextKey use cfaws.ConfigFromContextOrDefault(ctx) to retrieve the value If RequireDeploymentConfig has already run, this function will use the region value from the deployment config when setting the AWS config in context
func RequireCleanGitWorktree ¶
func RequireCleanGitWorktree() cli.BeforeFunc
RequireCleanGitWorktree checks if this is a git repo and if so, checks that the worktree is clean. this ensures that users working with a deployment config in a repo always commit their changes prior to deploying.
This method calls out to git if it is installed on the users system. Unfortunately, the go library go-git is very slow when checking status. https://github.com/go-git/go-git/issues/181 So this command uses the git cli directly. assumption is if a user is using a repository, they will have git installed
func RequireDeploymentConfig ¶
func RequireDeploymentConfig() cli.BeforeFunc
func ShouldShowHelp ¶
func ShouldShowHelp(c *cli.Context) bool
func VerifyGDeployCompatibility ¶
func VerifyGDeployCompatibility() cli.BeforeFunc
BeforeFunc wrapper for IsReleaseVersionDifferent func. Prompt user to save `gdeploy` version as release version to `deployment.yml` if release version and gdeploy version is different.
func WithBeforeFuncs ¶
func WithBeforeFuncs(cmd *cli.Command, funcs ...cli.BeforeFunc) *cli.Command
Types ¶
This section is empty.