Skip to content

Commit 2e43db4

Browse files
Extended build-images with dotnet restore commands
1 parent 563850d commit 2e43db4

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

build-images.ps1

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,34 @@ $pubFolderToDelete = $scriptPath + "\pub"
77
remove-item -path $pubFolderToDelete -Force -Recurse -ErrorAction SilentlyContinue
88
#cmd /c "rd /s pub" /q
99

10-
10+
# *** WebMVC image ***
1111
$webPathToJson = $scriptPath + "\src\Web\WebMVC\project.json"
1212
Write-Host "webPathToJson is $webPathToJson" -ForegroundColor Yellow
1313
$webPathToPub = $scriptPath + "\pub\webMVC"
1414
Write-Host "webPathToPub is $webPathToPub" -ForegroundColor Yellow
15+
16+
Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue
17+
dotnet restore $webPathToJson
1518
dotnet publish $webPathToJson -o $webPathToPub
1619

20+
#*** Catalog service image ***
1721
$catalogPathToJson = $scriptPath + "\src\Services\Catalog\Catalog.API\project.json"
1822
Write-Host "catalogPathToJson is $catalogPathToJson" -ForegroundColor Yellow
1923
$catalogPathToPub = $scriptPath + "\pub\catalog"
2024
Write-Host "catalogPathToPub is $catalogPathToPub" -ForegroundColor Yellow
25+
26+
Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue
27+
dotnet restore $catalogPathToJson
2128
dotnet publish $catalogPathToJson -o $catalogPathToPub
2229

30+
#*** Ordering service image ***
2331
$orderingPathToJson = $scriptPath + "\src\Services\Ordering\Ordering.API\project.json"
2432
Write-Host "orderingPathToJson is $orderingPathToJson" -ForegroundColor Yellow
2533
$orderingPathToPub = $scriptPath + "\pub\ordering"
2634
Write-Host "orderingPathToPub is $orderingPathToPub" -ForegroundColor Yellow
35+
36+
Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue
37+
dotnet restore $orderingPathToJson
2738
dotnet publish $orderingPathToJson -o $orderingPathToPub
2839

2940

0 commit comments

Comments
 (0)