Skip to content

Commit

Permalink
small simplification of protodot generation
Browse files Browse the repository at this point in the history
Signed-off-by: Avi Deitcher <[email protected]>
  • Loading branch information
deitch committed Jul 30, 2023
1 parent e7c8285 commit b1194f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ jobs:
run: make proto
- name: check no uncommitted files
run: |
# we run it twice, so that it will report on the logs
echo "changed and uncommitted files"
git status --short
if [ -n "$(git status --short)" ]; then
echo "changed and uncommitted files, excluding versions"
diff=$(git diff -I'^\/\/\s+protoc(-gen-go)?\s+v[0-9]+\.[0-9+\.[0-9]+\s*$')
if [ -n "diff" ]; then
# print the diff so we can fix it, if there is an issue
echo
echo "differences other than tool version changes:"
git diff -I'^\/\/\s+protoc(-gen-go)?\s+v[0-9]+\.[0-9+\.[0-9]+\s*$'
echo
echo "differences including tool version changes:"
git diff
exit 1
fi
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
proto-diagram:
protodot -inc /usr/include -src ./proto/config/devconfig.proto -output devconfig && cp ~/protodot/generated/devconfig.* ./images && dot ./images/devconfig.dot -Tpng -o ./images/devconfig.png && echo generated ./images/devconfig.*
protodot -inc /usr/include -src ./proto/config/devconfig.proto -output devconfig -generated ./images
dot ./images/devconfig.dot -Tpng -o ./images/devconfig.png
echo generated ./images/devconfig.*

.PHONY: proto-api-%

Expand Down

0 comments on commit b1194f6

Please sign in to comment.