Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Commit

Permalink
Update build scripts, tools, and dependencies for 2.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate McMaster committed Sep 21, 2017
1 parent a94e4df commit 4678e7c
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 18 deletions.
40 changes: 22 additions & 18 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tools_source=''
# Functions
#
__usage() {
echo "Usage: $(basename ${BASH_SOURCE[0]}) [options] [[--] <MSBUILD_ARG>...]"
echo "Usage: $(basename "${BASH_SOURCE[0]}") [options] [[--] <MSBUILD_ARG>...]"
echo ""
echo "Arguments:"
echo " <MSBUILD_ARG>... Arguments passed to MSBuild. Variable number of arguments allowed."
Expand All @@ -47,16 +47,17 @@ __usage() {
}

get_korebuild() {
local version
local lock_file="$repo_path/korebuild-lock.txt"
if [ ! -f $lock_file ] || [ "$update" = true ]; then
__get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" $lock_file
if [ ! -f "$lock_file" ] || [ "$update" = true ]; then
__get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lock_file"
fi
local version="$(grep 'version:*' -m 1 $lock_file)"
version="$(grep 'version:*' -m 1 "$lock_file")"
if [[ "$version" == '' ]]; then
__error "Failed to parse version from $lock_file. Expected a line that begins with 'version:'"
return 1
fi
version="$(echo ${version#version:} | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
version="$(echo "${version#version:}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version"

{
Expand All @@ -65,10 +66,10 @@ get_korebuild() {
local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip"
tmpfile="$(mktemp)"
echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}"
if __get_remote_file $remote_path $tmpfile; then
unzip -q -d "$korebuild_path" $tmpfile
if __get_remote_file "$remote_path" "$tmpfile"; then
unzip -q -d "$korebuild_path" "$tmpfile"
fi
rm $tmpfile || true
rm "$tmpfile" || true
fi

source "$korebuild_path/KoreBuild.sh"
Expand Down Expand Up @@ -99,19 +100,22 @@ __get_remote_file() {
local local_path=$2

if [[ "$remote_path" != 'http'* ]]; then
cp $remote_path $local_path
cp "$remote_path" "$local_path"
return 0
fi

failed=false
if __machine_has curl ; then
curl --retry 10 -sSL -f --create-dirs -o $local_path $remote_path || failed=true
elif __machine_has wget; then
wget --tries 10 -O $local_path $remote_path || failed=true
local failed=false
if __machine_has wget; then
wget --tries 10 --quiet -O "$local_path" "$remote_path" || failed=true
else
failed=true
fi

if [ "$failed" = true ] && __machine_has curl; then
failed=false
curl --retry 10 -sSL -f --create-dirs -o "$local_path" "$remote_path" || failed=true
fi

if [ "$failed" = true ]; then
__error "Download failed: $remote_path" 1>&2
return 1
Expand All @@ -122,15 +126,15 @@ __get_remote_file() {
# main
#

while [[ $# > 0 ]]; do
while [[ $# -gt 0 ]]; do
case $1 in
-\?|-h|--help)
__usage --no-exit
exit 0
;;
-c|--channel|-Channel)
shift
channel=${1:-}
channel="${1:-}"
[ -z "$channel" ] && __usage
;;
--config-file|-ConfigFile)
Expand All @@ -144,7 +148,7 @@ while [[ $# > 0 ]]; do
;;
-d|--dotnet-home|-DotNetHome)
shift
DOTNET_HOME=${1:-}
DOTNET_HOME="${1:-}"
[ -z "$DOTNET_HOME" ] && __usage
;;
--path|-Path)
Expand Down Expand Up @@ -213,4 +217,4 @@ fi

get_korebuild
install_tools "$tools_source" "$DOTNET_HOME"
invoke_repository_build "$repo_path" $@
invoke_repository_build "$repo_path" "$@"
69 changes: 69 additions & 0 deletions build/dependencies.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
<PackageReference Update="Microsoft.AspNet.Identity.AspNetCoreCompat" Version="0.3.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.All" Version="2.0.2-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Antiforgery" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.ApplicationInsights.HostingStartup" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Authentication" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Authentication.Abstractions" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Authentication.Cookies" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Authentication.Core" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Authentication.Facebook" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Authentication.Google" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.0.1-rtm-*" />
Expand All @@ -15,13 +19,36 @@
<PackageReference Update="Microsoft.AspNetCore.Authentication.Twitter" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Authorization" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Authorization.Policy" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.AzureAppServices.SiteExtension" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.AzureAppServicesIntegration" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Buffering" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Certificates.Configuration.Sources" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.ChunkingCookieManager.Sources" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.CookiePolicy" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Cors" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Cryptography.Internal" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.DataProtection" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.DataProtection.Abstractions" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.DataProtection.AzureStorage" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.DataProtection.Extensions" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.DataProtection.Redis" Version="0.3.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.DataProtection.SystemWeb" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Diagnostics" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Diagnostics.Abstractions" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Diagnostics.Elm" Version="0.3.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Diagnostics.Identity.Service" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Hosting" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Hosting.Server.Abstractions" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Hosting.WindowsServices" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Http" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Http.Abstractions" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Http.Extensions" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Http.Features" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.HttpOverrides" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Identity" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Identity.Service" Version="2.0.1-rtm-*" />
Expand All @@ -33,11 +60,45 @@
<PackageReference Update="Microsoft.AspNetCore.Identity.Service.Mvc" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Identity.Service.Specification.Tests" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Identity.Specification.Tests" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Localization" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Localization.Routing" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.MiddlewareAnalysis" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.NodeServices" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.NodeServices.Sockets" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Owin" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Proxy" Version="0.3.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.RangeHelper.Sources" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Razor" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Razor.Language" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Razor.Runtime" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Razor.TagHelpers.Testing.Sources" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.ResponseCaching" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.ResponseCaching.Abstractions" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.ResponseCompression" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Rewrite" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Routing" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Routing.Abstractions" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Routing.DecisionTree.Sources" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Server.HttpSys" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Server.IISIntegration" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Server.IntegrationTesting" Version="0.4.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Server.Kestrel" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Server.Kestrel.Core" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Server.Kestrel.Https" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.Session" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.SpaServices" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.StaticFiles" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.TestHost" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.WebSockets" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.AspNetCore.WebUtilities" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.CodeAnalysis.Razor" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.CodeAnalysis.Razor.Workspaces" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.CodeAnalysis.Remote.Razor" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.EntityFrameworkCore" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Design" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.EntityFrameworkCore.InMemory" Version="2.0.1-rtm-*" />
Expand All @@ -50,9 +111,15 @@
<PackageReference Update="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Tools" Version="2.0.1-rtm-*" />
<DotNetCliToolReference Update="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.Extensions.Hosting.Abstractions" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.Extensions.Identity.Core" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.Extensions.Identity.Stores" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.Extensions.Localization" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.Extensions.Localization.Abstractions" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.Net.Http.Headers" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.Owin.Security.Interop" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.VisualStudio.LanguageServices.Razor" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.VisualStudio.Web.BrowserLink" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.VisualStudio.Web.CodeGeneration" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.VisualStudio.Web.CodeGeneration.Contracts" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.VisualStudio.Web.CodeGeneration.Core" Version="2.0.1-rtm-*" />
Expand All @@ -62,5 +129,7 @@
<DotNetCliToolReference Update="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.VisualStudio.Web.CodeGeneration.Utils" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.VisualStudio.Web.CodeGenerators.Mvc" Version="2.0.1-rtm-*" />
<PackageReference Update="Microsoft.Web.Xdt.Extensions" Version="2.0.1-rtm-*" />
<PackageReference Update="RazorPageGenerator" Version="2.0.1-rtm-*" />
</ItemGroup>
</Project>

0 comments on commit 4678e7c

Please sign in to comment.