BMC/BCS.BMC/build/build-mvc.ps1

37 lines
1.1 KiB
PowerShell
Raw Normal View History

2022-10-10 20:44:01 +05:30
# COMMON PATHS
$buildFolder = (Get-Item -Path "./" -Verbose).FullName
$slnFolder = Join-Path $buildFolder "../"
$outputFolder = Join-Path $buildFolder "outputs"
$webMvcFolder = Join-Path $slnFolder "src/BCS.BMC.Web.Mvc"
## CLEAR ######################################################################
Remove-Item $outputFolder -Force -Recurse -ErrorAction Ignore
New-Item -Path $outputFolder -ItemType Directory
## RESTORE NUGET PACKAGES #####################################################
Set-Location $slnFolder
dotnet restore
## PUBLISH WEB MVC PROJECT ###################################################
Set-Location $webMvcFolder
dotnet publish --output (Join-Path $outputFolder "Mvc")
## CREATE DOCKER IMAGES #######################################################
# Mvc
Set-Location (Join-Path $outputFolder "Mvc")
docker rmi abp/mvc -f
docker build -t abp/mvc .
## DOCKER COMPOSE FILES #######################################################
Copy-Item (Join-Path $slnFolder "docker/mvc/*.*") $outputFolder
## FINALIZE ###################################################################
Set-Location $outputFolder