File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed
Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -96,24 +96,24 @@ if (!(Get-Command "docker" -ErrorAction SilentlyContinue))
9696 throw " 'docker' command not found"
9797}
9898
99+ if (Test-Path (Join-Path $ImageDirectory " metadata" ))
100+ {
101+ $Version = Get-Content (Join-Path $ImageDirectory " metadata" " IMAGE_VERSION" )
102+ }
103+ else
104+ {
105+ throw " No metadata found for $Name "
106+ }
107+
99108if (! $Tag )
100109{
101- if (Test-Path (Join-Path $ImageDirectory " metadata" ))
102- {
103- $Tag = " $DockerOrg /$Name "
104- $Version = Get-Content (Join-Path $ImageDirectory " metadata" " IMAGE_VERSION" )
105- $Tag += " :$Version "
106- $Revision = Get-Content (Join-Path $ImageDirectory " metadata" " IMAGE_REVISION" )
107- if ($Revision )
108- {
109- $Tag += " -$Revision "
110- }
111- $AdditionalTags = " $ ( Get-Content (Join-Path $ImageDirectory " metadata" " ADDITIONAL_TAGS" ) | ForEach-Object { $_.replace (" $Name " , " $DockerOrg /$Name " ) }) "
112- }
113- else
110+ $Tag = " $DockerOrg /${Name} :$Version "
111+ $Revision = Get-Content (Join-Path $ImageDirectory " metadata" " IMAGE_REVISION" )
112+ if ($Revision )
114113 {
115- throw " No metadata found for $Name "
114+ $Tag += " - $Revision "
116115 }
116+ $AdditionalTags = " $ ( Get-Content (Join-Path $ImageDirectory " metadata" " ADDITIONAL_TAGS" ) | ForEach-Object { $_.replace (" $Name " , " $DockerOrg /$Name " ) }) "
117117}
118118else
119119{
You can’t perform that action at this time.
0 commit comments