#ps

# Configs
$Env:CONTAINER_REGISTRY = "harbor.vimpelcom.ru"
$Env:PRODUCT            = "vega/cloud"
$Env:IMAGE_NAME         = "docs"
$Env:PRODUCT_VERSION    = "0.6.2" # node -p "require('./package.json').version" 
$Env:PKG_NAME           = "vega-portal" # node -p "require('./package.json').name"

# VITE VARS

Remove-Item -Recurse -Force dist

# Write-Output "Version: " node -p "require('./package.json').version"
git pull
Write-Output " Компиляция:" $env:PKG_NAME'@'$env:PRODUCT_VERSION
npm install
npm run build

docker build -f ./build.Dockerfile -t $env:CONTAINER_REGISTRY/$env:PRODUCT/$env:IMAGE_NAME':'$env:PRODUCT_VERSION .
docker image list | FINDSTR "$env:PRODUCT/$env:IMAGE_NAME"
docker push $env:CONTAINER_REGISTRY/$env:PRODUCT/$env:IMAGE_NAME':'$env:PRODUCT_VERSION
