Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #9263 from chcosta/refactor_packaging
Browse files Browse the repository at this point in the history
Refactor coreclr packaging
  • Loading branch information
chcosta committed Feb 15, 2017
2 parents 0fae96e + 3ec9032 commit 371d608
Show file tree
Hide file tree
Showing 104 changed files with 337 additions and 3,270 deletions.
7 changes: 6 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ usage()
echo "cmakeargs - user-settable additional arguments passed to CMake."
echo "bindir - output directory (defaults to $__ProjectRoot/bin)"
echo "buildstandalonegc - builds the GC in a standalone mode. Can't be used with \"cmakeargs\"."

echo "msbuildonunsupportedplatform - build managed binaries even if distro is not officially supported."
exit 1
}

Expand Down Expand Up @@ -341,6 +341,7 @@ isMSBuildOnNETCoreSupported()
__isMSBuildOnNETCoreSupported=1
;;
*)
__isMSBuildOnNETCoreSupported=$__msbuildonunsupportedplatform
esac
elif [ "$__HostOS" == "OSX" ]; then
__isMSBuildOnNETCoreSupported=1
Expand Down Expand Up @@ -559,6 +560,7 @@ __cmakeargs=""
__SkipGenerateVersion=0
__DoCrossArchBuild=0
__PortableLinux=0
__msbuildonunsupportedplatform=0

while :; do
if [ $# -le 0 ]; then
Expand Down Expand Up @@ -729,6 +731,9 @@ while :; do
buildstandalonegc)
__cmakeargs="-DFEATURE_STANDALONE_GC=1"
;;
msbuildonunsupportedplatform)
__msbuildonunsupportedplatform=1
;;
*)
__UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
;;
Expand Down
1 change: 0 additions & 1 deletion dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@

<Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>
<Platform Condition="'$(Platform)' == 'amd64'">x64</Platform>

</PropertyGroup>

<!-- Output paths -->
Expand Down
1 change: 0 additions & 1 deletion dir.traversal.targets
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@
</Target>

<Target Name="Rebuild" DependsOnTargets="Clean;Build" />

</Project>
26 changes: 13 additions & 13 deletions init-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,45 +18,45 @@ __INIT_TOOLS_DONE_MARKER=$__PROJECT_JSON_PATH/done
# Extended version of platform detection logic from dotnet/cli/scripts/obtain/dotnet-install.sh 16692fc
get_current_linux_name() {
# Detect Distro
if [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then
if [ "$(cat /etc/*-release | grep -cim1 16.04)" -eq 1 ]; then
if [ "$(cat /etc/os-release | grep -cim1 ubuntu)" -eq 1 ]; then
if [ "$(cat /etc/os-release | grep -cim1 16.04)" -eq 1 ]; then
echo "ubuntu.16.04"
return 0
fi
if [ "$(cat /etc/*-release | grep -cim1 16.10)" -eq 1 ]; then
if [ "$(cat /etc/os-release | grep -cim1 16.10)" -eq 1 ]; then
echo "ubuntu.16.10"
return 0
fi

echo "ubuntu"
return 0
elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then
elif [ "$(cat /etc/os-release | grep -cim1 centos)" -eq 1 ]; then
echo "centos"
return 0
elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then
elif [ "$(cat /etc/os-release | grep -cim1 rhel)" -eq 1 ]; then
echo "rhel"
return 0
elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then
elif [ "$(cat /etc/os-release | grep -cim1 debian)" -eq 1 ]; then
echo "debian"
return 0
elif [ "$(cat /etc/*-release | grep -cim1 alpine)" -eq 1 ]; then
elif [ "$(cat /etc/os-release | grep -cim1 alpine)" -eq 1 ]; then
echo "alpine"
return 0
elif [ "$(cat /etc/*-release | grep -cim1 fedora)" -eq 1 ]; then
if [ "$(cat /etc/*-release | grep -cim1 23)" -eq 1 ]; then
elif [ "$(cat /etc/os-release | grep -cim1 fedora)" -eq 1 ]; then
if [ "$(cat /etc/os-release | grep -cim1 23)" -eq 1 ]; then
echo "fedora.23"
return 0
fi
if [ "$(cat /etc/*-release | grep -cim1 24)" -eq 1 ]; then
if [ "$(cat /etc/os-release | grep -cim1 24)" -eq 1 ]; then
echo "fedora.24"
return 0
fi
elif [ "$(cat /etc/*-release | grep -cim1 opensuse)" -eq 1 ]; then
if [ "$(cat /etc/*-release | grep -cim1 13.2)" -eq 1 ]; then
elif [ "$(cat /etc/os-release | grep -cim1 opensuse)" -eq 1 ]; then
if [ "$(cat /etc/os-release | grep -cim1 13.2)" -eq 1 ]; then
echo "opensuse.13.2"
return 0
fi
if [ "$(cat /etc/*-release | grep -cim1 42.1)" -eq 1 ]; then
if [ "$(cat /etc/os-release | grep -cim1 42.1)" -eq 1 ]; then
echo "opensuse.42.1"
return 0
fi
Expand Down
90 changes: 2 additions & 88 deletions src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.builds
Original file line number Diff line number Diff line change
Expand Up @@ -2,95 +2,9 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />

<PropertyGroup>
<!-- This property must be set to the same value as $(PackageOutputPath) for the nuspecs and nupkgs to be binplaced to the intended location. -->
<OutputPath>$(PackageOutputPath)</OutputPath>
</PropertyGroup>

<!-- We always build the identity/redirection package. However, the platform specific runtime-*.nupkg is built based upon the target OS we are building the product for. -->
<ItemGroup>
<Project Include="Microsoft.NETCore.ILAsm.pkgproj">
</Project>
<Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Windows_NT</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Windows_NT</OSGroup>
<Platform>arm64</Platform>
</Project>
<Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Windows_NT</OSGroup>
<Platform>x86</Platform>
</Project>
<Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Windows_NT</OSGroup>
<Platform>arm</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'linux-x64'" Include="linux/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'debian.8-x64'" Include="debian/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'debian.8-armel'" Include="debian/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>armel</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'fedora.23-x64'" Include="fedora/23/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'fedora.24-x64'" Include="fedora/24/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'opensuse.13.2-x64'" Include="opensuse/13.2/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'opensuse.42.1-x64'" Include="opensuse/42.1/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and $(DistroRid.StartsWith('rhel.7'))" Include="rhel/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-x64'" Include="ubuntu/14.04/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.14.04-arm'" Include="ubuntu/14.04/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>arm</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-x64'" Include="ubuntu/16.04/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.04-arm'" Include="ubuntu/16.04/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>arm</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.10-x64'" Include="ubuntu/16.10/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'alpine.3.4.3-x64'" Include="alpine/3.4.3/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'tizen.4.0.0-armel'" Include="tizen/4.0.0/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>armel</Platform>
</Project>
<Project Condition="'$(TargetsOSX)' == 'true'" Include="osx/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>OSX</OSGroup>
<Platform>amd64</Platform>
</Project>
<!-- identity project, runtime specific projects are included by props above -->
<Project Include="$(MSBuildProjectName).pkgproj" />
</ItemGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
Expand Down
78 changes: 11 additions & 67 deletions src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj
Original file line number Diff line number Diff line change
@@ -1,75 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<SkipPackageFileCheck>true</SkipPackageFileCheck>
<SkipValidatePackage>true</SkipValidatePackage>
<PackagePlatforms>x64;x86;arm64;arm;armel;</PackagePlatforms>
<OutputPath>$(PackagesOutputPath)</OutputPath>
<IncludeRuntimeJson>true</IncludeRuntimeJson>

<PropertyGroup Condition="'$(PackageTargetRuntime)' == ''">
<IsLineupPackage Condition="'$(IsLineupPackage)' == ''">true</IsLineupPackage>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.NETCore.Runtime.CoreCLR\Microsoft.NETCore.Runtime.CoreCLR.pkgproj" />
<ProjectReference Include="win\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="win\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>arm64</Platform>
</ProjectReference>
<ProjectReference Include="win\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>x86</Platform>
</ProjectReference>
<ProjectReference Include="win\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>arm</Platform>
</ProjectReference>
<ProjectReference Include="linux\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="debian\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="debian\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>armel</Platform>
</ProjectReference>
<ProjectReference Include="fedora\23\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="fedora\24\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="opensuse\13.2\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="opensuse\42.1\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="rhel\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu\14.04\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>arm</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu\16.04\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>arm</Platform>
</ProjectReference>
<ProjectReference Include="ubuntu\16.10\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="alpine\3.4.3\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
<ProjectReference Include="tizen\4.0.0\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>armel</Platform>
</ProjectReference>
<ProjectReference Include="osx\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>

<ItemGroup Condition="'$(IsLineupPackage)' == 'true'">
<ProjectReference Include="..\Microsoft.NETCore.Runtime.CoreCLR\Microsoft.NETCore.Runtime.CoreCLR.pkgproj" >
<!-- we should look at moving this into packaging.targets instead of having to carry this around for every pkgproj project reference -->
<AdditionalProperties>%(ProjectReference.AdditionalProperties);IsLineupPackage=false</AdditionalProperties>
</ProjectReference>
</ItemGroup>

<Import Condition="'$(_packageTargetOSGroup)' != ''" Project="$(MSBuildThisFileDirectory)runtime.$(_packageTargetOSGroup).$(MSBuildProjectName).props" />

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 371d608

Please sign in to comment.