-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Add support for source-build #11717
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
Merged
Merged
Add support for source-build #11717
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6f8d9ba
Add support for source-build
a34d389
Try to exclude Ref package
fb600f6
Try exclusion
7d6d90d
Update
42912c3
Do not build redist tarball in source build
8d367b5
Add comment
94c88bc
Cleanup
c2f9ac7
Update .azure/pipelines/ci.yml
e59f1f9
Feedback
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
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- Use this file to workaround issues. List the issue tracking the item to fix so we can remove the workaround when the issue is resolved. --> | ||
<Project> | ||
<!-- Workaround https://github.com/dotnet/source-build/issues/1112. Source link is currently disabled in source build so define this dummy target which is required for pack. --> | ||
<Target Name="InitializeSourceControlInformation"/> | ||
dougbu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
dougbu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# | ||
# This script is meant for testing source build by imitating some of the input parameters and conditions. | ||
# | ||
|
||
set -euo pipefail | ||
|
||
scriptroot="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
reporoot="$(dirname "$(dirname "$scriptroot")")" | ||
|
||
# For local development, make a backup copy of this file first | ||
if [ ! -f "$reporoot/global.bak.json" ]; then | ||
mv "$reporoot/global.json" "$reporoot/global.bak.json" | ||
fi | ||
|
||
# Detect the current version of .NET Core installed | ||
export SDK_VERSION=$(dotnet --version) | ||
echo "The ambient version of .NET Core SDK version = $SDK_VERSION" | ||
|
||
# Update the global.json file to match the current .NET environment | ||
cat "$reporoot/global.bak.json" | \ | ||
jq '.sdk.version=env.SDK_VERSION' | \ | ||
jq '.tools.dotnet=env.SDK_VERSION' | \ | ||
jq 'del(.tools.runtimes)' \ | ||
> "$reporoot/global.json" | ||
|
||
# Restore the original global.json file | ||
trap "{ | ||
mv "$reporoot/global.bak.json" "$reporoot/global.json" | ||
}" EXIT | ||
|
||
export DotNetBuildFromSource='true' | ||
|
||
# Build repo tasks | ||
"$reporoot/eng/common/build.sh" --restore --build --ci --configuration Release /p:ProjectToBuild=$reporoot/eng/tools/RepoTasks/RepoTasks.csproj | ||
|
||
# Build projects | ||
"$reporoot/eng/common/build.sh" --restore --build --pack "$@" |
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
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
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.