Browse Source

Extended build-images with dotnet restore commands

pull/49/merge
Cesar De la Torre 8 years ago
parent
commit
2e43db4953
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      build-images.ps1

+ 12
- 1
build-images.ps1 View File

@ -7,23 +7,34 @@ $pubFolderToDelete = $scriptPath + "\pub"
remove-item -path $pubFolderToDelete -Force -Recurse -ErrorAction SilentlyContinue remove-item -path $pubFolderToDelete -Force -Recurse -ErrorAction SilentlyContinue
#cmd /c "rd /s pub" /q #cmd /c "rd /s pub" /q
# *** WebMVC image ***
$webPathToJson = $scriptPath + "\src\Web\WebMVC\project.json" $webPathToJson = $scriptPath + "\src\Web\WebMVC\project.json"
Write-Host "webPathToJson is $webPathToJson" -ForegroundColor Yellow Write-Host "webPathToJson is $webPathToJson" -ForegroundColor Yellow
$webPathToPub = $scriptPath + "\pub\webMVC" $webPathToPub = $scriptPath + "\pub\webMVC"
Write-Host "webPathToPub is $webPathToPub" -ForegroundColor Yellow Write-Host "webPathToPub is $webPathToPub" -ForegroundColor Yellow
Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue
dotnet restore $webPathToJson
dotnet publish $webPathToJson -o $webPathToPub dotnet publish $webPathToJson -o $webPathToPub
#*** Catalog service image ***
$catalogPathToJson = $scriptPath + "\src\Services\Catalog\Catalog.API\project.json" $catalogPathToJson = $scriptPath + "\src\Services\Catalog\Catalog.API\project.json"
Write-Host "catalogPathToJson is $catalogPathToJson" -ForegroundColor Yellow Write-Host "catalogPathToJson is $catalogPathToJson" -ForegroundColor Yellow
$catalogPathToPub = $scriptPath + "\pub\catalog" $catalogPathToPub = $scriptPath + "\pub\catalog"
Write-Host "catalogPathToPub is $catalogPathToPub" -ForegroundColor Yellow Write-Host "catalogPathToPub is $catalogPathToPub" -ForegroundColor Yellow
Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue
dotnet restore $catalogPathToJson
dotnet publish $catalogPathToJson -o $catalogPathToPub dotnet publish $catalogPathToJson -o $catalogPathToPub
#*** Ordering service image ***
$orderingPathToJson = $scriptPath + "\src\Services\Ordering\Ordering.API\project.json" $orderingPathToJson = $scriptPath + "\src\Services\Ordering\Ordering.API\project.json"
Write-Host "orderingPathToJson is $orderingPathToJson" -ForegroundColor Yellow Write-Host "orderingPathToJson is $orderingPathToJson" -ForegroundColor Yellow
$orderingPathToPub = $scriptPath + "\pub\ordering" $orderingPathToPub = $scriptPath + "\pub\ordering"
Write-Host "orderingPathToPub is $orderingPathToPub" -ForegroundColor Yellow Write-Host "orderingPathToPub is $orderingPathToPub" -ForegroundColor Yellow
Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue
dotnet restore $orderingPathToJson
dotnet publish $orderingPathToJson -o $orderingPathToPub dotnet publish $orderingPathToJson -o $orderingPathToPub


Loading…
Cancel
Save