-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI/tasks: ensure go.mod/sum and generated pb code are up-to-date
ci: use newer protoc ci: go 1.21 to match our go.mod ci: actions/setup-go@v4
- Loading branch information
1 parent
f58287f
commit 46763b1
Showing
6 changed files
with
67 additions
and
23 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
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
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,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
go mod tidy | ||
|
||
STATUS=$(git status go.mod go.sum --porcelain) | ||
|
||
if [[ -n "$STATUS" ]]; then | ||
echo "Changes detected in 'go.mod' or 'go.sum' after running 'go mod tidy'!" | ||
exit 1 | ||
else | ||
echo "No changes detected in 'go.mod' or 'go.sum'." | ||
exit 0 | ||
fi |
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,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script ensures that the generated protobuf .go files are up-to-date. | ||
|
||
pushd $(git rev-parse --show-toplevel) > /dev/null | ||
|
||
# Force regenerate of pb Go code. | ||
task -f pb:compile:v1 | ||
|
||
STATUS=$(git status api/protobuf/tx/v1 --porcelain) | ||
|
||
popd > /dev/null | ||
|
||
if [[ -n "$STATUS" ]]; then | ||
echo "Changes detected in api/protobuf/tx/v1 !" | ||
exit 1 | ||
else | ||
echo "No changes detected in the directory." | ||
exit 0 | ||
fi | ||
|
||
popd |