Skip to content

Commit

Permalink
Merge branch 'main' into i4k-send-deployment-title-body
Browse files Browse the repository at this point in the history
  • Loading branch information
i4ki committed Aug 28, 2023
2 parents e2b3ac4 + 1903c0b commit dbe530a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ Given a version number `MAJOR.MINOR.PATCH`, we increment the:

- Add support for globs in the `import.source` attribute to import multiple files at once.
- Add support for listing *unhealthy* stacks with `terramate list --experimental-status=unhealthy`.
- Add support for triggering *unhealthy* stacks with `terramate experimental trigger --experimental-status=unhealthy`.
- Add support for triggering *unhealthy* stacks with `terramate experimental trigger --experimental-status=unhealthy`.


### Fixed

- Allow to specify multiple tags separated by comma when using `terramate create --tags` command.
- Fixed inconsistent behaviour in `terramate create` vs. `terramate create --all-terraform`, both now populate the name/description fields the same way.

## 0.4.0

Expand Down
27 changes: 10 additions & 17 deletions cmd/terramate/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,10 @@ type cliSpec struct {

Metadata struct{} `cmd:"" help:"Shows metadata available on the project"`

Globals struct {
} `cmd:"" help:"List globals for all stacks"`
Globals struct{} `cmd:"" help:"List globals for all stacks"`

Generate struct {
Debug struct {
} `cmd:"" help:"Shows generate debug information"`
Debug struct{} `cmd:"" help:"Shows generate debug information"`
} `cmd:"" help:"Experimental generate commands"`

RunGraph struct {
Expand All @@ -176,8 +174,7 @@ type cliSpec struct {
Basedir string `arg:"" optional:"true" help:"Base directory to search stacks"`
} `cmd:"" help:"Show the topological ordering of the stacks"`

RunEnv struct {
} `cmd:"" help:"List run environment variables for all stacks"`
RunEnv struct{} `cmd:"" help:"List run environment variables for all stacks"`

Vendor struct {
Download struct {
Expand Down Expand Up @@ -205,10 +202,8 @@ type cliSpec struct {
} `cmd:"" help:"Get configuration value"`

Cloud struct {
Login struct {
} `cmd:"" help:"login for cloud.terramate.io"`
Info struct {
} `cmd:"" help:"cloud information status"`
Login struct{} `cmd:"" help:"login for cloud.terramate.io"`
Info struct{} `cmd:"" help:"cloud information status"`
} `cmd:"" help:"Terramate Cloud commands"`
} `cmd:"" help:"Experimental features (may change or be removed in the future)"`
}
Expand Down Expand Up @@ -285,7 +280,6 @@ func newCLI(version string, args []string, stdin io.Reader, stdout, stderr io.Wr
}),
kong.Writers(stdout, stderr),
)

if err != nil {
fatal(err, "creating cli parser")
}
Expand Down Expand Up @@ -1141,12 +1135,15 @@ func (c *cli) initDir(baseDir string) error {

stackDir := baseDir
stackID, err := uuid.NewRandom()
dirBasename := filepath.Base(stackDir)
if err != nil {
fatal(err, "creating stack UUID")
}
stackSpec := config.Stack{
Dir: prj.PrjAbsPath(c.rootdir(), stackDir),
ID: stackID.String(),
Dir: prj.PrjAbsPath(c.rootdir(), stackDir),
ID: stackID.String(),
Name: dirBasename,
Description: dirBasename,
}

err = stack.Create(c.cfg(), stackSpec)
Expand Down Expand Up @@ -1866,7 +1863,6 @@ func (c *cli) checkOutdatedGeneratedCode() {
logger.Trace().Msg("checking if any stack has outdated code")

outdatedFiles, err := generate.DetectOutdated(c.cfg(), c.vendorDir())

if err != nil {
fatal(err, "failed to check outdated code on project")
}
Expand Down Expand Up @@ -2153,7 +2149,6 @@ func runCheckpoint(version string, clicfg cliconfig.Config, result chan *checkpo
CacheFile: cacheFile,
},
)

if err != nil {
logger.Debug().Msgf("checkpoint error: %v", err)
resp = nil
Expand Down Expand Up @@ -2224,7 +2219,6 @@ func newGit(basedir string, checkrepo bool) (*git.Git, error) {
WorkingDir: basedir,
Env: os.Environ(),
})

if err != nil {
return nil, err
}
Expand Down Expand Up @@ -2304,7 +2298,6 @@ func lookupProject(wd string) (prj project, found bool, err error) {
prj.rootdir = rootCfgPath
prj.root = *rootcfg
return prj, true, nil

}

func configureLogging(logLevel, logFmt, logdest string, stdout, stderr io.Writer) {
Expand Down

0 comments on commit dbe530a

Please sign in to comment.