mirror of
https://github.com/netbirdio/dex.git
synced 2026-05-22 18:43:53 -07:00
Utilize native git diff feature (#2981)
This `--exit-code` option does exactly what the script is doing Signed-off-by: Marco Franssen <marco.franssen@gmail.com>
This commit is contained in:
@@ -100,23 +100,23 @@ bin/protoc-gen-go-grpc:
|
||||
##@ Verify
|
||||
|
||||
verify: generate ## Verify that all the code was generated and committed to repository.
|
||||
@./scripts/git-diff
|
||||
@git diff --exit-code
|
||||
|
||||
.PHONY: verify-proto
|
||||
verify-proto: generate-proto ## Verify that the Dex client's protobuf code was generated.
|
||||
@./scripts/git-diff
|
||||
@git diff --exit-code
|
||||
|
||||
.PHONY: verify-proto
|
||||
verify-proto-internal: generate-proto-internal ## Verify internal protobuf code for token encoding was generated.
|
||||
@./scripts/git-diff
|
||||
@git diff --exit-code
|
||||
|
||||
.PHONY: verify-ent
|
||||
verify-ent: generate-ent ## Verify code for database ORM was generated.
|
||||
@./scripts/git-diff
|
||||
@git diff --exit-code
|
||||
|
||||
.PHONY: verify-go-mod
|
||||
verify-go-mod: go-mod-tidy ## Check that go.mod and go.sum formatted according to the changes.
|
||||
@./scripts/git-diff
|
||||
@git diff --exit-code
|
||||
|
||||
##@ Test and Lint
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
DIFF=$( git diff . )
|
||||
if [ "$DIFF" != "" ]; then
|
||||
echo "$DIFF" >&2
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user