-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
16c2772
commit 31ad9de
Showing
8 changed files
with
145 additions
and
12 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
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,7 @@ | ||
#!/bin/bash | ||
# Formats the code | ||
set -e | ||
cd "$(dirname "$0")/.." | ||
gofumpt -w . | ||
gci write --skip-generated -s standard -s default -s "prefix(github.com/blackstork-io/fabric)" . | ||
|
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,6 @@ | ||
#!/bin/bash | ||
# Runs codegen and docgen tools | ||
set -e | ||
cd "$(dirname "$0")" | ||
./gen_code.sh | ||
./gen_docs.sh |
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,21 @@ | ||
#!/bin/bash | ||
# Runs codegen tools | ||
set -e | ||
cd "$(dirname "$0")/.." | ||
|
||
if [ -z "$GOBIN" ]; then | ||
if [ -z "$GOPATH" ]; then | ||
if [ -z "$HOME" ]; then | ||
echo "HOME is unset" | ||
exit 1 | ||
fi | ||
GOBIN="$HOME/go/bin" | ||
else | ||
GOBIN="$GOPATH/bin" | ||
fi | ||
fi | ||
PATH="$GOBIN:$PATH" | ||
|
||
buf generate | ||
mockery | ||
go mod tidy |
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,6 @@ | ||
#!/bin/bash | ||
# Runs codegen tools | ||
set -e | ||
cd "$(dirname "$0")/.." | ||
|
||
go run ./tools/docgen --version $(git describe --tags --abbrev=0) --output ./docs/plugins |
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,11 @@ | ||
#!/bin/bash | ||
# Installs tools | ||
set -e | ||
cd "$(dirname "$0")/.." | ||
# Codegen tools | ||
go install github.com/vektra/mockery/v2@v2.42.1 & | ||
go install github.com/bufbuild/buf/cmd/buf@v1.32.2 & | ||
# Formatting tools | ||
go install github.com/daixiang0/gci@v0.13.4 & | ||
go install mvdan.cc/gofumpt@v0.6.0 & | ||
wait |
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,9 @@ | ||
#!/bin/bash | ||
# Removes all generated files | ||
|
||
cd "$(dirname "$0")/.." | ||
|
||
grep -R --with-filename --files-with-matches --no-messages --include "*.go" -E -e '^// Code generated .* DO NOT EDIT.$' . | xargs rm | ||
find ./mocks -type d -empty -exec rmdir {} + | ||
|
||
find ./docs/plugins -mindepth 1 \( -maxdepth 1 -type d -o -not -name "*.md" \) -exec rm -rf {} + |
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