Skip to content

Commit

Permalink
Fail the build if global.json was updated. (#20983)
Browse files Browse the repository at this point in the history
While not strictly necessary for a successful build, the API diff will
fail unless we have the correct global.json contents checked in.
  • Loading branch information
rolfbjarne committed Aug 6, 2024
1 parent f44c076 commit bb5cc93
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

8 comments on commit bb5cc93

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.