Skip to content

Commit

Permalink
Merge pull request #1511 from fasaxc/check-typha-pin
Browse files Browse the repository at this point in the history
Add static check for Typha pin.
  • Loading branch information
fasaxc authored Aug 23, 2017
2 parents 7b77b98 + d5ad2e2 commit 2993e8c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,24 @@ go-meta-linter: vendor/.up-to-date $(GENERATED_GO_FILES)
--enable=goimports \
--vendor ./...

.PHONY: check-typha-pins
check-typha-pins: vendor/.up-to-date
@echo "Checking Typha's libcalico-go pin matches ours (so that any datamodel"
@echo "changes are reflected in the Typha-Felix API)."
@echo
@echo "Felix's libcalico-go pin:"
@grep libcalico-go glide.lock -A 5 | grep 'version:' | head -n 1
@echo "Typha's libcalico-go pin:"
@grep libcalico-go vendor/github.com/projectcalico/typha/glide.lock -A 5 | grep 'version:' | head -n 1
if [ "`grep libcalico-go glide.lock -A 5 | grep 'version:' | head -n 1`" != \
"`grep libcalico-go vendor/github.com/projectcalico/typha/glide.lock -A 5 | grep 'version:' | head -n 1`" ]; then \
echo "Typha and Felix libcalico-go pins differ."; \
false; \
fi

.PHONY: static-checks
static-checks:
$(MAKE) go-meta-linter check-licenses
$(MAKE) check-typha-pins go-meta-linter check-licenses

.PHONY: ut-no-cover
ut-no-cover: vendor/.up-to-date $(FELIX_GO_FILES)
Expand Down

0 comments on commit 2993e8c

Please sign in to comment.