From 2a64cd57ded0d839b6afecd0288affcb28ad6786 Mon Sep 17 00:00:00 2001 From: Igor Sychev Date: Sat, 2 Sep 2017 09:17:01 +0300 Subject: [PATCH 1/2] dotnet restore not needed in cli 2.0 "Starting with .NET Core 2.0 SDK, dotnet restore runs implicitily when you run dotnet build." (C) https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-build?tabs=netcore2x --- cli-mac/build-bits.sh | 2 -- cli-windows/build-bits-simple.ps1 | 2 -- 2 files changed, 4 deletions(-) diff --git a/cli-mac/build-bits.sh b/cli-mac/build-bits.sh index fdf61e359..8548ec72b 100755 --- a/cli-mac/build-bits.sh +++ b/cli-mac/build-bits.sh @@ -22,8 +22,6 @@ do echo -e "\e[33m\tRemoving old publish output" pushd $(pwd)/$project rm -rf obj/Docker/publish - echo -e "\e[33m\tRestoring project" - dotnet restore echo -e "\e[33m\tBuilding and publishing projects" dotnet publish -o obj/Docker/publish -c Release popd diff --git a/cli-windows/build-bits-simple.ps1 b/cli-windows/build-bits-simple.ps1 index 461384cc2..008f4f599 100644 --- a/cli-windows/build-bits-simple.ps1 +++ b/cli-windows/build-bits-simple.ps1 @@ -13,7 +13,5 @@ Write-Host "Root path used is $rootPath" -ForegroundColor Yellow $SolutionFilePath = [IO.Path]::Combine($rootPath, "eShopOnContainers-ServicesAndWebApps.sln") -dotnet restore $SolutionFilePath - dotnet publish $SolutionFilePath -c Release -o .\obj\Docker\publish From fda16ba61761d587f6892037d968594424e8afa2 Mon Sep 17 00:00:00 2001 From: Igor Sychev Date: Wed, 6 Sep 2017 14:46:22 +0300 Subject: [PATCH 2/2] dotnet restore not needed in cli 2.0 "Starting with .NET Core 2.0 SDK, dotnet restore runs implicitily when you run dotnet build." (C) https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-build?tabs=netcore2x --- cli-windows/build-bits.ps1 | 1 - k8s/deploy.ps1 | 1 - 2 files changed, 2 deletions(-) diff --git a/cli-windows/build-bits.ps1 b/cli-windows/build-bits.ps1 index 38cdfddcd..3b3d8da3f 100644 --- a/cli-windows/build-bits.ps1 +++ b/cli-windows/build-bits.ps1 @@ -31,7 +31,6 @@ $projectPaths = #Write-Host "Deleting old publish files in $outPath" -ForegroundColor Yellow remove-item -path $outPath -Force -Recurse -ErrorAction SilentlyContinue #Write-Host "Publishing $projectPathAndFile to $outPath" -ForegroundColor Yellow - dotnet build $projectPathAndFile dotnet publish $projectPathAndFile -o $outPath -c Release } } diff --git a/k8s/deploy.ps1 b/k8s/deploy.ps1 index be9424b4f..6b6318aca 100644 --- a/k8s/deploy.ps1 +++ b/k8s/deploy.ps1 @@ -54,7 +54,6 @@ Write-Host "Docker image Tag: $imageTag" -ForegroundColor Yellow # building and publishing docker images if needed if($buildBits) { Write-Host "Building and publishing eShopOnContainers..." -ForegroundColor Yellow - dotnet restore ../eShopOnContainers-ServicesAndWebApps.sln dotnet publish -c Release -o obj/Docker/publish ../eShopOnContainers-ServicesAndWebApps.sln } if ($buildImages) {