Skip to content

Commit 8bf12c6

Browse files
fix: simplify check for ACI deployment in custom deployment
2 parents 7b04179 + 462a53d commit 8bf12c6

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

azure_custom.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ hooks:
3636
3737
# Check if this is first run (ACR doesn't exist yet)
3838
# Set IMAGE_TAG='none' to skip ACI deployment until image is built
39-
$currentTag = azd env get-value IMAGE_TAG 2>$null
40-
$global:LASTEXITCODE = 0
41-
42-
if (-not $env:AZURE_CONTAINER_REGISTRY_NAME -and $currentTag -ne 'latest') {
39+
if (-not $env:AZURE_CONTAINER_REGISTRY_NAME) {
4340
Write-Host "First deployment - ACI will be deployed after image build" -ForegroundColor Yellow
4441
azd env set IMAGE_TAG none
4542
}
@@ -50,9 +47,7 @@ hooks:
5047
echo "Preparing deployment..."
5148
5249
# Check if this is first run (ACR doesn't exist yet)
53-
current_tag=$(azd env get-value IMAGE_TAG 2>/dev/null || echo "")
54-
55-
if [ -z "$AZURE_CONTAINER_REGISTRY_NAME" ] && [ "$current_tag" != "latest" ]; then
50+
if [ -z "$AZURE_CONTAINER_REGISTRY_NAME" ]; then
5651
echo "First deployment - ACI will be deployed after image build"
5752
azd env set IMAGE_TAG none
5853
fi

0 commit comments

Comments
 (0)