diff --git a/azure_custom.yaml b/azure_custom.yaml index a79c694e9..4500fcfc0 100644 --- a/azure_custom.yaml +++ b/azure_custom.yaml @@ -36,10 +36,7 @@ hooks: # Check if this is first run (ACR doesn't exist yet) # Set IMAGE_TAG='none' to skip ACI deployment until image is built - $currentTag = azd env get-value IMAGE_TAG 2>$null - $global:LASTEXITCODE = 0 - - if (-not $env:AZURE_CONTAINER_REGISTRY_NAME -and $currentTag -ne 'latest') { + if (-not $env:AZURE_CONTAINER_REGISTRY_NAME) { Write-Host "First deployment - ACI will be deployed after image build" -ForegroundColor Yellow azd env set IMAGE_TAG none } @@ -50,9 +47,7 @@ hooks: echo "Preparing deployment..." # Check if this is first run (ACR doesn't exist yet) - current_tag=$(azd env get-value IMAGE_TAG 2>/dev/null || echo "") - - if [ -z "$AZURE_CONTAINER_REGISTRY_NAME" ] && [ "$current_tag" != "latest" ]; then + if [ -z "$AZURE_CONTAINER_REGISTRY_NAME" ]; then echo "First deployment - ACI will be deployed after image build" azd env set IMAGE_TAG none fi