Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion TestAssets/TestProjects/StandaloneApp/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
"osx.10.11-x64": {},
"ubuntu.14.04-x64": {},
"ubuntu.16.04-x64": {},
"ubuntu.16.10-x64": {},
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
"opensuse.13.2-x64": {},
"opensuse.42.1-x64": {}
}
}
4 changes: 3 additions & 1 deletion TestAssets/TestProjects/StandaloneTestApp/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@
"osx.10.11-x64": {},
"ubuntu.14.04-x64": {},
"ubuntu.16.04-x64": {},
"ubuntu.16.10-x64": {},
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
"opensuse.13.2-x64": {},
"opensuse.42.1-x64": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"allowUnsafe": true
},
"dependencies": {
"NETStandard.Library": "1.6.0",
"NETStandard.Library": "1.6.1-beta-24506-02",
"System.Diagnostics.Process": "4.1.0",
"System.Reflection.TypeExtensions": "4.1.0",
"Microsoft.DotNet.InternalAbstractions": "1.0.0-rc2-002702"
Expand Down
4 changes: 3 additions & 1 deletion build_projects/dotnet-host-build/CompileTargets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ public class CompileTargets
{ "osx.10.11-x64", "osx.10.10-x64" },
{ "ubuntu.14.04-x64", "ubuntu.14.04-x64" },
{ "ubuntu.16.04-x64", "ubuntu.16.04-x64" },
{ "ubuntu.16.10-x64", "ubuntu.16.10-x64" },
{ "centos.7-x64", "rhel.7-x64" },
{ "rhel.7-x64", "rhel.7-x64" },
{ "rhel.7.2-x64", "rhel.7-x64" },
{ "debian.8-x64", "debian.8-x64" },
{ "fedora.23-x64", "fedora.23-x64" },
{ "opensuse.13.2-x64", "opensuse.13.2-x64" }
{ "opensuse.13.2-x64", "opensuse.13.2-x64" },
{ "opensuse.42.1-x64", "opensuse.42.1-x64" }
};

[Target(nameof(PrepareTargets.Init),
Expand Down
6 changes: 4 additions & 2 deletions build_projects/dotnet-host-build/PublishTargets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ public static BuildTargetResult FinalizeBuild(BuildTargetContext c)
"debian.x64.version",
"centos.x64.version",
"fedora.23.x64.version",
"opensuse.13.2.x64.version"
"opensuse.13.2.x64.version",
"opensuse.42.1.x64.version"

This comment was marked as spam.

This comment was marked as spam.

};

PublishCoreHostPackagesToFeed();
Expand Down Expand Up @@ -184,7 +185,8 @@ private static bool CheckIfAllBuildsHavePublished()
{ "sharedfx_Debian_x64", false },
{ "sharedfx_CentOS_x64", false },
{ "sharedfx_Fedora_23_x64", false },
{ "sharedfx_openSUSE_13_2_x64", false }
{ "sharedfx_openSUSE_13_2_x64", false },
{ "sharedfx_openSUSE_42_1_x64", false }
};

List<string> blobs = new List<string>(AzurePublisherTool.ListBlobs($"{Channel}/Binaries/{SharedFrameworkNugetVersion}/"));
Expand Down
8 changes: 5 additions & 3 deletions build_projects/dotnet-host-build/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"emitEntryPoint": true
},
"dependencies": {
"NETStandard.Library": "1.6.0",
"Microsoft.NETCore.Runtime.CoreCLR": "1.0.2",
"NETStandard.Library": "1.6.1-beta-24506-02",
"Microsoft.NETCore.Runtime.CoreCLR": "1.1.0-beta-24507-05",
"Microsoft.CSharp": "4.0.1",
"System.Dynamic.Runtime": "4.0.11",
"System.Reflection.Metadata": "1.3.0",
Expand Down Expand Up @@ -35,10 +35,12 @@
"osx.10.11-x64": {},
"ubuntu.14.04-x64": {},
"ubuntu.16.04-x64": {},
"ubuntu.16.10-x64": {},
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
"opensuse.13.2-x64": {},
"opensuse.42.1-x64": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace Microsoft.DotNet.Cli.Build
{
public class DependencyVersions
{
public static readonly string CoreCLRVersion = "1.0.2";
public static readonly string JitVersion = "1.0.2";
public static readonly string CoreCLRVersion = "1.1.0-beta-24509-04";
public static readonly string JitVersion = "1.1.0-beta-24509-04";
public static readonly string CoreCLRVersion_Latest = "1.1.0-beta-24415-01";
public static readonly string JitVersion_Latest = "1.1.0-beta-24415-01";
}
Expand Down
2 changes: 1 addition & 1 deletion build_projects/shared-build-targets-utils/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "1.0.0-*",
"description": "Build scripts for dotnet-cli",
"dependencies": {
"NETStandard.Library": "1.6.0",
"NETStandard.Library": "1.6.1-beta-24506-02",
"Microsoft.CSharp": "4.0.1",
"System.Dynamic.Runtime": "4.0.11",
"System.Reflection.Metadata": "1.3.0",
Expand Down
4 changes: 2 additions & 2 deletions build_projects/update-dependencies/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"emitEntryPoint": true
},
"dependencies": {
"NETStandard.Library": "1.6.0",
"NETStandard.Library": "1.6.1-beta-24506-02",
"Microsoft.CSharp": "4.0.1",
"Microsoft.NETCore.Runtime.CoreCLR": "1.0.2",
"Microsoft.NETCore.Runtime.CoreCLR": "1.1.0-beta-24507-05",
"System.Runtime.Serialization.Primitives": "4.1.1",
"Microsoft.DotNet.Cli.Build.Framework": {
"target": "project"
Expand Down
2 changes: 1 addition & 1 deletion pkg/BuildToolsVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.25-prerelease-00511-02
1.0.26-prerelease-00809-01
2 changes: 1 addition & 1 deletion pkg/DotnetCLIVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0-preview2-002733
1.0.0-preview3-003223
2 changes: 1 addition & 1 deletion pkg/init-tools.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ echo Installing dotnet cli...
if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"
set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt"
set DOTNET_ZIP_NAME=dotnet-dev-win-x64.%DOTNET_VERSION%.zip
set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/Sdk/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%"
powershell -NoProfile -ExecutionPolicy unrestricted -Command "$retryCount = 0; $success = $false; do { try { (New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $retryCount++; Start-Sleep -Seconds (5 * $retryCount); } } } while ($success -eq $false); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> "%INIT_TOOLS_LOG%"
Expand Down
102 changes: 74 additions & 28 deletions pkg/init-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,84 @@ __BUILD_TOOLS_PATH=$__PACKAGES_DIR/Microsoft.DotNet.BuildTools/$__BUILD_TOOLS_PA
__PROJECT_JSON_PATH=$__TOOLRUNTIME_DIR/$__BUILD_TOOLS_PACKAGE_VERSION
__PROJECT_JSON_FILE=$__PROJECT_JSON_PATH/project.json
__PROJECT_JSON_CONTENTS="{ \"dependencies\": { \"Microsoft.DotNet.BuildTools\": \"$__BUILD_TOOLS_PACKAGE_VERSION\" }, \"frameworks\": { \"netcoreapp1.0\": { } } }"
__INIT_TOOLS_DONE_MARKER=$__PROJECT_JSON_PATH/done

OSName=$(uname -s)
case $OSName in
Darwin)
OS=OSX
__DOTNET_PKG=dotnet-dev-osx-x64
ulimit -n 2048
;;
# Extended version of platform detection logic from dotnet/cli/scripts/obtain/dotnet-install.sh 16692fc
get_current_linux_name() {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

# Detect Distro
if [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then
if [ "$(cat /etc/*-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
echo "ubuntu.16.10"
return 0
fi

Linux)
OS=Linux
if [ ! -e /etc/os-release ]; then
echo "Cannot determine Linux distribution, asuming Ubuntu 14.04."
__DOTNET_PKG=dotnet-dev-ubuntu.14.04-x64
else
source /etc/os-release
__DOTNET_PKG="dotnet-dev-$ID.$VERSION_ID-x64"
echo "ubuntu"
return 0
elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then
echo "centos"
return 0
elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then
echo "rhel"
return 0
elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then
echo "debian"
return 0
elif [ "$(cat /etc/*-release | grep -cim1 fedora)" -eq 1 ]; then
if [ "$(cat /etc/*-release | grep -cim1 23)" -eq 1 ]; then
echo "fedora.23"
return 0
fi
if [ "$(cat /etc/*-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
echo "opensuse.13.2"
return 0
fi
;;
if [ "$(cat /etc/*-release | grep -cim1 42.1)" -eq 1 ]; then
echo "opensuse.42.1"
return 0
fi
fi

# Cannot determine Linux distribution, assuming Ubuntu 14.04.
echo "ubuntu"
return 0
}

*)
echo "Unsupported OS '$OSName' detected. Downloading ubuntu-x64 tools."
OS=Linux
__DOTNET_PKG=dotnet-dev-ubuntu-x64
;;
esac
if [ -z "$__DOTNET_PKG" ]; then
OSName=$(uname -s)
case $OSName in
Darwin)
OS=OSX
__DOTNET_PKG=dotnet-dev-osx-x64
ulimit -n 2048
;;

Linux)
__DOTNET_PKG="dotnet-dev-$(get_current_linux_name)-x64"
OS=Linux
;;

if [ ! -e $__PROJECT_JSON_FILE ]; then
*)
echo "Unsupported OS '$OSName' detected. Downloading ubuntu-x64 tools."
OS=Linux
__DOTNET_PKG=dotnet-dev-ubuntu-x64
;;
esac
fi
if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then
if [ -e $__TOOLRUNTIME_DIR ]; then rm -rf -- $__TOOLRUNTIME_DIR; fi
echo "Running: $__scriptpath/init-tools.sh" > $__init_tools_log
if [ ! -e $__DOTNET_PATH ]; then
echo "Installing dotnet cli..."
__DOTNET_LOCATION="https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.${__DOTNET_TOOLS_VERSION}.tar.gz"
__DOTNET_LOCATION="https://dotnetcli.blob.core.windows.net/dotnet/Sdk/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.${__DOTNET_TOOLS_VERSION}.tar.gz"
# curl has HTTPS CA trust-issues less often than wget, so lets try that first.
echo "Installing '${__DOTNET_LOCATION}' to '$__DOTNET_PATH/dotnet.tar'" >> $__init_tools_log
which curl > /dev/null 2> /dev/null
Expand All @@ -66,18 +111,19 @@ if [ ! -e $__PROJECT_JSON_FILE ]; then

if [ ! -e $__BUILD_TOOLS_PATH ]; then
echo "Restoring BuildTools version $__BUILD_TOOLS_PACKAGE_VERSION..."
echo "Running: $__DOTNET_CMD restore \"$__PROJECT_JSON_FILE\" --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE" >> $__init_tools_log
$__DOTNET_CMD restore "$__PROJECT_JSON_FILE" --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE >> $__init_tools_log
if [ ! -e "$__BUILD_TOOLS_PATH/init-tools.sh" ]; then echo "ERROR: Could not restore build tools correctly. See '$__init_tools_log' for more details."; fi
echo "Running: $__DOTNET_CMD restore \"$__PROJECT_JSON_FILE\" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE" >> $__init_tools_log

This comment was marked as spam.

This comment was marked as spam.

$__DOTNET_CMD restore "$__PROJECT_JSON_FILE" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE >> $__init_tools_log
if [ ! -e "$__BUILD_TOOLS_PATH/init-tools.sh" ]; then echo "ERROR: Could not restore build tools correctly. See '$__init_tools_log' for more details."1>&2; fi
fi

echo "Initializing BuildTools..."
echo "Running: $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR" >> $__init_tools_log
$__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR >> $__init_tools_log
if [ "$?" != "0" ]; then
echo "ERROR: An error occured when trying to initialize the tools. Please check '$__init_tools_log' for more details."
echo "ERROR: An error occured when trying to initialize the tools. Please check '$__init_tools_log' for more details."1>&2
exit 1
fi
touch $__INIT_TOOLS_DONE_MARKER
echo "Done initializing tools."
else
echo "Tools are already initialized"
Expand Down
6 changes: 4 additions & 2 deletions pkg/pack.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
setlocal EnableDelayedExpansion

set __ProjectDir=%~dp0
set __DotNet=%__ProjectDir%\Tools\dotnetcli\dotnet.exe
set __MSBuild=%__ProjectDir%\Tools\MSBuild.exe

:: Initialize the MSBuild Tools
call "%__ProjectDir%\init-tools.cmd"

:: Restore dependencies mainly to obtain runtime.json
pushd "%__ProjectDir%\deps"
"%__ProjectDir%\Tools\dotnetcli\dotnet.exe" restore --source "https://dotnet.myget.org/F/dotnet-core" --packages "%__ProjectDir%\packages"
"%__DotNet%" restore --source "https://dotnet.myget.org/F/dotnet-core" --packages "%__ProjectDir%\packages"
popd

:: Clean up existing nupkgs
if exist "%__ProjectDir%\bin" (rmdir /s /q "%__ProjectDir%\bin")

:: Package the assets using Tools

"%__ProjectDir%\Tools\corerun" "%__ProjectDir%\Tools\MSBuild.exe" "%__ProjectDir%\projects\packages.builds" /p:TargetsWindows=true /verbosity:minimal
"%__DotNet%" "%__MSBuild%" "%__ProjectDir%\projects\packages.builds" /p:TargetsWindows=true /verbosity:minimal

if not ERRORLEVEL 0 goto :Error
exit /b 0
Expand Down
5 changes: 2 additions & 3 deletions pkg/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ popd
rm -rf $__project_dir/bin

# build to produce nupkgs
__corerun="$__project_dir/Tools/corerun"
__msbuild="$__project_dir/Tools/MSBuild.exe"
__msbuild="$__project_dir/Tools/msbuild.sh"

__targets_param=
if [ "$(uname -s)" == "Darwin" ]; then
Expand All @@ -50,6 +49,6 @@ fi

__common_parameters="/p:$__targets_param /p:DistroRid=$__distro_rid /verbosity:minimal"

$__corerun $__msbuild $__project_dir/projects/packages.builds $__common_parameters || exit 1
$__msbuild $__project_dir/projects/packages.builds $__common_parameters || exit 1

exit 0
12 changes: 6 additions & 6 deletions pkg/projects/Microsoft.NETCore.App/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
"Microsoft.CodeAnalysis.CSharp": "1.3.0",
"Microsoft.CodeAnalysis.VisualBasic": "1.3.0",
"Microsoft.CSharp": "4.0.1",
"Microsoft.NETCore.Runtime.CoreCLR": "1.1.0-beta-24415-01",
"Microsoft.NETCore.Runtime.CoreCLR": "1.1.0-beta-24509-04",
"Microsoft.VisualBasic": "10.0.1",
"NETStandard.Library": "1.6.1-beta-24415-01",
"NETStandard.Library": "1.6.1-preview1-24508-08",
"System.Buffers": "4.0.0",
"System.Collections.Immutable": "1.2.0",
"System.ComponentModel": "4.0.1",
"System.ComponentModel.Annotations": "4.1.0",
"System.Diagnostics.DiagnosticSource": "4.0.0",
"System.Diagnostics.Process": "4.1.1-beta-24415-01",
"System.Diagnostics.Process": "4.3.0-preview1-24508-08",
"System.Dynamic.Runtime": "4.0.11",
"System.Globalization.Extensions": "4.0.1",
"System.IO.FileSystem.Watcher": "4.0.0",
"System.IO.MemoryMappedFiles": "4.0.0",
"System.IO.UnmanagedMemoryStream": "4.0.1",
"System.Linq.Expressions": "4.1.1-beta-24415-01",
"System.Linq.Parallel": "4.0.2-beta-24415-01",
"System.Linq.Expressions": "4.3.0-preview1-24508-08",
"System.Linq.Parallel": "4.3.0-preview1-24508-08",
"System.Linq.Queryable": "4.0.1",
"System.Net.NameResolution": "4.0.0",
"System.Net.Requests": "4.0.11",
"System.Net.Security": "4.0.0",
"System.Net.WebHeaderCollection": "4.0.1",
"System.Numerics.Vectors": "4.1.1",
"System.Reflection.DispatchProxy": "4.0.1",
"System.Reflection.Metadata": "1.3.0",
"System.Reflection.Metadata": "1.4.1-preview1-24508-08",
"System.Reflection.TypeExtensions": "4.1.0",
"System.Resources.Reader": "4.0.0",
"System.Runtime.Loader": "4.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'ubuntu.16.10-x64'" Include="ubuntu.16.10/Microsoft.NETCore.DotNetHost.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'fedora.23-x64'" Include="fedora.23/Microsoft.NETCore.DotNetHost.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
Expand All @@ -47,6 +51,10 @@
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'opensuse.42.1-x64'" Include="opensuse.42.1/Microsoft.NETCore.DotNetHost.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
</Project>
<Project Condition="'$(TargetsOSX)' == 'true'" Include="osx/Microsoft.NETCore.DotNetHost.pkgproj">
<OSGroup>OSX</OSGroup>
<Platform>amd64</Platform>
Expand Down
Loading