Skip to content

Commit

Permalink
Merge pull request #44 from ivanilves/BUMP
Browse files Browse the repository at this point in the history
docs: Refresh README and references
  • Loading branch information
ivanilves authored Apr 7, 2023
2 parents 652f27f + 81e0d87 commit e9eb2e7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- uses: actions/checkout@v3

- name: staticcheck
uses: dominikh/staticcheck-action@v1.2.0
uses: dominikh/staticcheck-action@v1.3.0

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ builds:
brews:
- name: travelgrunt
homepage: 'https://github.com/ivanilves/travelgrunt'
description: 'Travel Terragrunt directory tree as a first class passenger!'
description: 'cd inside [mono]repos without fatigue!'
folder: Formula
tap:
owner: ivanilves
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Travel **[Terragrunt](https://terragrunt.gruntwork.io/)**, **[Terraform](https:/
* use arrow keys to navigate the list and `/` key to search for specific items;

## Configuration
If no configuration file found `travelgrunt` will assume repository having only Terragrunt projects inside!
:bulb: If no configuration file found `travelgrunt` will assume repository having only Terragrunt projects inside.

Create `.travelgrunt.yml` file in the root path of your repository. Example config for a random monorepo:

Expand All @@ -34,11 +34,11 @@ rules:
:arrow_up: Config is essentially a list of sequentially applied path matching rules. Each rule can have these fields:

* `prefix` - literal prefix to be matched against relative directory path;
* `name` - a free form regular expression or a simple glob (`name: '*.go'`) match applied to file name;
* `mode` - any matching behavior backed by a function from the [`mode`](https://github.com/ivanilves/travelgrunt/tree/main/pkg/config/mode) package;
* `negate` - boolean directive that reverses the meaning of the match;
* `name` - a free form regular expression or a simple glob (`name: '*.go'`) match applied to the file name;
* `mode` - any matching behavior backed by a [custom logic] function from the [`mode`](https://github.com/ivanilves/travelgrunt/tree/main/pkg/config/mode) package;
* `negate` - boolean directive that reverses the meaning of the match, excluding the paths matched;

:bulb: Even while developing `travelgrunt` itself I use it to navigate [package directories](https://github.com/ivanilves/travelgrunt/blob/main/.travelgrunt.yml) of the application.
:bulb: Even while developing `travelgrunt` itself we use it to navigate [package directories](https://github.com/ivanilves/travelgrunt/blob/main/.travelgrunt.yml) of the application :tophat:

## Shell aliases

Expand All @@ -48,6 +48,8 @@ alias tg='_tg(){ travelgrunt -out-file ~/.tg-path ${@} && cd "$(cat ~/.tg-path)"
alias tt='_tt(){ travelgrunt -top -out-file ~/.tg-path && cd "$(cat ~/.tg-path)" }; _tt'
```

These lines are usually added to `~/.bashrc` or `~/.zshrc` file, depending on your system and shell of choice.

:bulb: **tt** is a "convenience alias" that brings you to the top level path of your repository.

### Why aliases?
Expand Down
2 changes: 1 addition & 1 deletion cmd/travelgrunt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func main() {
entries, paths, err := directory.Collect(rootPath, cfg)

if err != nil {
log.Fatalf("failed to collect Terragrunt project directories: %s", err.Error())
log.Fatalf("failed to collect directories: %s", err.Error())
}

if err := filter.Validate(flag.Args()); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/menu/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func getSize(itemCount int, size int) int {
return size
}

// Build creates an interactive menu to chose Terragrunt project from
// Build creates an interactive menu to chose destination directory from
func Build(items []string, maxSize int, previous string) (selected string, err error) {
if len(items) == 0 {
return "", fmt.Errorf("no items")
Expand Down

0 comments on commit e9eb2e7

Please sign in to comment.