-
Notifications
You must be signed in to change notification settings - Fork 549
[src] Consume ADR from a NuGet instead of building it ourselves. #24381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rolfbjarne
wants to merge
3
commits into
main
Choose a base branch
from
dev/rolf/adr-nuget
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+57
−203
Open
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,95 +1,5 @@ | ||
| ifdef ENABLE_XAMARIN | ||
| ifdef ENABLE_ADR | ||
| NEEDED_ADR_VERSION := 1908cef0c0b4630e6a7abd4a6fc5cafc95536d65 | ||
| NEEDED_ADR_BRANCH := main | ||
|
|
||
| ADR_DIRECTORY := macios-adr | ||
| ADR_MODULE := https://[email protected]/devdiv/DevDiv/_git/macios-adr | ||
| ADR_VERSION := $(shell cd $(ADR_PATH) 2> /dev/null && git rev-parse HEAD 2> /dev/null) | ||
| ADR_BRANCH := $(shell cd $(ADR_PATH) 2> /dev/null && git symbolic-ref --short HEAD 2> /dev/null) | ||
| endif | ||
| endif | ||
|
|
||
| # Available versions can be seen here: | ||
| # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.Tools.Mlaunch/versions | ||
| MLAUNCH_NUGET_VERSION=1.1.93 | ||
|
|
||
| define CheckVersionTemplate | ||
| check-$(1):: | ||
| @rm -f $(THISDIR)/.stamp-reset-$(1) | ||
| @if test x$$(IGNORE_$(2)_VERSION) = "x"; then \ | ||
| if test ! -d $($(2)_PATH); then \ | ||
| if test x$$(RESET_VERSIONS) != "x"; then \ | ||
| make reset-$(1) || exit 1; \ | ||
| else \ | ||
| echo "Your $(1) checkout is $(COLOR_RED)missing$(COLOR_CLEAR), please run 'make reset-$(1)'"; \ | ||
| touch .check-versions-failure; \ | ||
| fi; \ | ||
| else \ | ||
| if test "x$($(2)_VERSION)" != "x$(NEEDED_$(2)_VERSION)" ; then \ | ||
| if test x$$(RESET_VERSIONS) != "x"; then \ | ||
| make reset-$(1) || exit 1; \ | ||
| else \ | ||
| echo "Your $(1) version is $(COLOR_RED)out of date$(COLOR_CLEAR), please run 'make reset-$(1)' (found $($(2)_VERSION), expected $(NEEDED_$(2)_VERSION)). Alternatively export IGNORE_$(2)_VERSION=1 to skip this check."; \ | ||
| test -z "$(BUILD_REVISION)" || $(MAKE) test-$(1); \ | ||
| touch .check-versions-failure; \ | ||
| fi; \ | ||
| elif test "x$($(2)_BRANCH)" != "x$(NEEDED_$(2)_BRANCH)" ; then \ | ||
| if test x$$(RESET_VERSIONS) != "x"; then \ | ||
| test -z "$(BUILD_REVISION)" || $(MAKE) test-$(1); \ | ||
| make reset-$(1) || exit 1; \ | ||
| else \ | ||
| echo "Your $(1) branch is $(COLOR_RED)out of date$(COLOR_CLEAR), please run 'make reset-$(1)' (found $($(2)_BRANCH), expected $(NEEDED_$(2)_BRANCH)). Alternatively export IGNORE_$(2)_VERSION=1 to skip this check."; \ | ||
| touch .check-versions-failure; \ | ||
| fi; \ | ||
| else \ | ||
| echo "$(1) is $(COLOR_GREEN)up-to-date$(COLOR_CLEAR)."; \ | ||
| fi; \ | ||
| fi; \ | ||
| else \ | ||
| echo "$(1) is $(COLOR_GRAY)ignored$(COLOR_CLEAR)."; \ | ||
| fi | ||
|
|
||
| test-$(1):: | ||
| @echo $(1) | ||
| @echo " $(2)_DIRECTORY=$($(2)_DIRECTORY)" | ||
| @echo " $(2)_MODULE=$($(2)_MODULE)" | ||
| @echo " NEEDED_$(2)_VERSION=$(NEEDED_$(2)_VERSION)" | ||
| @echo " $(2)_VERSION=$($(2)_VERSION)" | ||
| @echo " NEEDED_$(2)_BRANCH=$(NEEDED_$(2)_BRANCH)" | ||
| @echo " $(2)_BRANCH=$($(2)_BRANCH)" | ||
| @echo " $(2)_PATH=$($(2)_PATH) => $(abspath $($(2)_PATH))" | ||
|
|
||
| reset-$(1):: | ||
| $(Q) \ | ||
| DEPENDENCY_PATH=$($(2)_PATH) \ | ||
| DEPENDENCY_MODULE=$($(2)_MODULE) \ | ||
| DEPENDENCY_HASH=$(NEEDED_$(2)_VERSION) \ | ||
| DEPENDENCY_BRANCH=$(NEEDED_$(2)_BRANCH) \ | ||
| DEPENDENCY_DIRECTORY=$($(2)_DIRECTORY) \ | ||
| DEPENDENCY_IGNORE_VERSION=$(IGNORE_$(2)_VERSION) \ | ||
| $(TOP)/mk/xamarin-reset.sh $(1) | ||
| @touch $(THISDIR)/.stamp-reset-$(1) | ||
|
|
||
| print-$(1):: | ||
| @printf "*** %-16s %-45s %s (%s)\n" "$($(2)_DIRECTORY)" "$($(2)_MODULE)" "$(NEEDED_$(2)_VERSION)" "$(NEEDED_$(2)_BRANCH)" | ||
|
|
||
| .PHONY: check-$(1) reset-$(1) print-$(1) | ||
|
|
||
| reset-versions-impl:: reset-$(1) | ||
| check-versions:: check-$(1) | ||
| print-versions:: print-$(1) | ||
|
|
||
| DEPENDENCY_DIRECTORIES += $$(abspath $($(2)_PATH)) | ||
|
|
||
| endef | ||
|
|
||
| ifdef ENABLE_XAMARIN | ||
| $(MACCORE_PATH): | ||
|
|
||
| $(ADR_PATH): | ||
| $(Q) git clone --recursive $(ADR_MODULE) $(ADR_PATH) | ||
| $(Q) $(MAKE) reset-adr | ||
|
|
||
| $(eval $(call CheckVersionTemplate,macios-adr,ADR)) | ||
| endif | ||
| # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/AppleDocReader/versions | ||
| ADR_NUGET_VERSION=1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| *.stamp | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| TOP=../.. | ||
|
|
||
| include $(TOP)/Make.config | ||
| include $(TOP)/mk/xamarin.mk | ||
|
|
||
| ADR_NUGET_VERSION=1.0.0 | ||
rolfbjarne marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| DOWNLOAD_STAMP_FILE=.download-$(ADR_NUGET_VERSION).stamp | ||
|
|
||
| $(DOWNLOAD_STAMP_FILE): | ||
| $(Q) $(DOTNET) restore download-adr.csproj /bl:$@.binlog $(MSBUILD_VERBOSITY) /p:AdrNuGetVersion=$(ADR_NUGET_VERSION) /p:AdrRuntimeIdentifier=$(ADR_RUNTIME_IDENTIFIER) | ||
| $(Q) touch $@ | ||
|
|
||
| clean-local:: | ||
| $(Q) rm -rf .*.stamp obj .*.binlog | ||
|
|
||
| TARGETS += $(DOWNLOAD_STAMP_FILE) | ||
|
|
||
| all-local:: $(TARGETS) | ||
| install-local:: $(TARGETS) | ||
| download: $(DOWNLOAD_STAMP_FILE) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| adr | ||
| --- | ||
|
|
||
| adr is a closed source tool used to inject links to Apple's documentation into the xml documentation generated from our source code. | ||
|
|
||
| Location: https://dev.azure.com/devdiv/DevDiv/_git/macios-adr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)</TargetFramework> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="../../eng/Versions.props" /> | ||
|
|
||
| <ItemGroup> | ||
| <PackageDownload Include="AppleDocReader.$(AdrRuntimeIdentifier)" Version="[$(AdrNuGetVersion)]" /> | ||
| </ItemGroup> | ||
|
|
||
| <Target Name="Download" /> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.