Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
atmos describe affected
CLI command. Update docs website (#274)
* Update versions * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Add `atmos describe affected` command * Update website/docs/cli/commands/describe/describe-affected.md Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com> * Add `atmos describe affected` command * Add `atmos describe affected` command * Update website/docs/cli/commands/describe/describe-affected.md Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com> * Add `atmos describe affected` command Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com>
- Loading branch information
Showing
15 changed files
with
993 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
|
||
e "github.com/cloudposse/atmos/internal/exec" | ||
u "github.com/cloudposse/atmos/pkg/utils" | ||
) | ||
|
||
// describeAffectedCmd produces a list of the affected Atmos components and stacks given two Git commits | ||
var describeAffectedCmd = &cobra.Command{ | ||
Use: "affected", | ||
Short: "Execute 'describe affected' command", | ||
Long: `This command produces a list of the affected Atmos components and stacks given two Git commits: atmos describe stacks [options]`, | ||
FParseErrWhitelist: struct{ UnknownFlags bool }{UnknownFlags: true}, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
err := e.ExecuteDescribeAffectedCmd(cmd, args) | ||
if err != nil { | ||
u.PrintErrorToStdErrorAndExit(err) | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
describeAffectedCmd.DisableFlagParsing = false | ||
|
||
describeAffectedCmd.PersistentFlags().String("ref", "", "Git reference with which to compare the current branch: atmos describe affected --ref refs/heads/main. Refer to https://git-scm.com/book/en/v2/Git-Internals-Git-References for more details") | ||
describeAffectedCmd.PersistentFlags().String("sha", "", "Git commit SHA with which to compare the current branch: atmos describe affected --sha 3a5eafeab90426bd82bf5899896b28cc0bab3073") | ||
describeAffectedCmd.PersistentFlags().String("file", "", "Write the result to the file: atmos describe affected --ref refs/tags/v1.16.0 --file affected.json") | ||
describeAffectedCmd.PersistentFlags().String("format", "json", "The output format: atmos describe affected --format=json|yaml ('json' is default)") | ||
describeAffectedCmd.PersistentFlags().Bool("verbose", false, "Print more detailed output when cloning and checking out the Git repository: atmos describe affected --verbose=true") | ||
|
||
describeCmd.AddCommand(describeAffectedCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.