Skip to content

Commit

Permalink
chore: add script to tidy all go modules (#888) (#910)
Browse files Browse the repository at this point in the history
## Description

Adding a make job to tidy all go modules
```
make go-mod-tidy
```

----

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added appropriate labels to the PR
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/umee-network/umee/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit f46cad8)

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
Co-authored-by: toteki <63419657+toteki@users.noreply.github.com>
  • Loading branch information
3 people authored May 14, 2022
1 parent 3f77a12 commit 0712ff2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
@go mod verify

go-mod-tidy:
@contrib/scripts/go-mod-tidy-all.sh

clean:
@echo "--> Cleaning..."
@rm -rf $(BUILD_DIR)/** $(DIST_DIR)/**
Expand Down
9 changes: 9 additions & 0 deletions contrib/scripts/go-mod-tidy-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -euo pipefail

for modfile in $(find . -name go.mod); do
echo "Updating $modfile"
DIR=$(dirname $modfile)
(cd $DIR; go mod tidy --compat=1.17)
done

0 comments on commit 0712ff2

Please sign in to comment.