-
Notifications
You must be signed in to change notification settings - Fork 733
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for source-build (#1740)
- Loading branch information
1 parent
030b50f
commit ad4067b
Showing
20 changed files
with
176 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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
Empty file.
This file contains 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 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,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# 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' | ||
"$reporoot/eng/common/build.sh" --restore --build --pack "$@" |
This file contains 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 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,8 @@ | ||
<Project> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" /> | ||
|
||
<PropertyGroup> | ||
<!-- These projects depend on code which is not open source. --> | ||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild> | ||
</PropertyGroup> | ||
</Project> |
This file contains 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,8 @@ | ||
<Project> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" /> | ||
|
||
<PropertyGroup> | ||
<!-- These projects depend on a 3rd party source --> | ||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild> | ||
</PropertyGroup> | ||
</Project> |
This file contains 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,8 @@ | ||
<Project> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" /> | ||
|
||
<PropertyGroup> | ||
<!-- These projects depend on a 3rd party source. --> | ||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild> | ||
</PropertyGroup> | ||
</Project> |
8 changes: 8 additions & 0 deletions
8
src/Configuration/Config.NewtonsoftJson/Directory.Build.props
This file contains 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,8 @@ | ||
<Project> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" /> | ||
|
||
<PropertyGroup> | ||
<!-- These projects depend on a 3rd party source. --> | ||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild> | ||
</PropertyGroup> | ||
</Project> |
This file contains 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 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 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,8 @@ | ||
<Project> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" /> | ||
|
||
<PropertyGroup> | ||
<!-- Source build does not support Windows. --> | ||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild> | ||
</PropertyGroup> | ||
</Project> |
This file contains 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,8 @@ | ||
<Project> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" /> | ||
|
||
<PropertyGroup> | ||
<!-- These projects depend on a 3rd party source --> | ||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild> | ||
</PropertyGroup> | ||
</Project> |
This file contains 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,8 @@ | ||
<Project> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" /> | ||
|
||
<PropertyGroup> | ||
<!-- These projects depend on a 3rd party source --> | ||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild> | ||
</PropertyGroup> | ||
</Project> |
This file contains 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 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,8 @@ | ||
<Project> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" /> | ||
|
||
<PropertyGroup> | ||
<!-- These projects depend on a 3rd party source --> | ||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild> | ||
</PropertyGroup> | ||
</Project> |