diff --git a/Makefile b/Makefile index f21abc4c9fb5..ef263bb0ceaa 100644 --- a/Makefile +++ b/Makefile @@ -75,6 +75,12 @@ global.json: $(TOP)/dotnet.config Makefile $(GIT_DIRECTORY)/HEAD $(GIT_DIRECTORY printf " \"sdk\": {\n \"version\": \"$(DOTNET_VERSION)\"\n }\n" >> $@; \ printf "}\n" >> $@ +install-hook:: + $(Q) if ! git diff --exit-code global.json; then \ + echo "Error: global.json has changed: please commit the changes."; \ + exit 1; \ + fi + install-hook:: @$(MAKE) check-permissions ifdef INCLUDE_IOS