File tree Expand file tree Collapse file tree 4 files changed +19
-5
lines changed Expand file tree Collapse file tree 4 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 244
244
245
245
<Target Name =" BuildImage" >
246
246
<Exec Command =" $(PowerShellCoreCommandPrefix) " . $(DockerTools)/GetArtifacts.ps1 -Artifacts $(RepoArtifacts) -Docker $(DockerRoot) " " />
247
- <Exec Command =" $(PowerShellCoreCommandPrefix) " . $(DockerTools)/BuildImages.ps1 -DOCKER $(DockerRoot) -IMAGENAME $(DockerImageName) " " />
247
+ <Exec Command =" $(PowerShellCoreCommandPrefix) " . $(DockerTools)/BuildImages.ps1 -DOCKER $(DockerRoot) -DockerImageName $(DockerImageName) " " />
248
248
<Exec Command =" $(PowerShellCoreCommandPrefix) " . $(DockerTools)/CleanArtifacts.ps1 -Docker $(DockerRoot) " " />
249
249
</Target >
250
250
Original file line number Diff line number Diff line change
1
+ az.version=3.3.0
Original file line number Diff line number Diff line change @@ -154,6 +154,19 @@ function Update-ChangeLog
154
154
($Content + $ChangeLogContent ) | Set-Content - Path $ChangeLogFile.FullName - Encoding UTF8
155
155
}
156
156
157
+ function Update-Image-Releases
158
+ {
159
+ Param (
160
+ [Parameter (Mandatory = $true )]
161
+ [string ]$ReleaseProps ,
162
+ [Parameter (Mandatory = $true )]
163
+ [string ]$AzVersion
164
+ )
165
+
166
+ $content = Get-Content $ReleaseProps
167
+ $content -Replace " az.version=\d+\.\d+\.\d+" , " az.version=$AzVersion " | Set-Content $ReleaseProps
168
+ }
169
+
157
170
function Get-ExistSerializedCmdletJsonFile
158
171
{
159
172
return $ (ls " $PSScriptRoot \Tools.Common\SerializedCmdlets" ).Name
@@ -287,5 +300,6 @@ switch ($PSCmdlet.ParameterSetName)
287
300
288
301
Update-ModuleManifest - Path " $PSScriptRoot \Az\Az.psd1" - ModuleVersion $newVersion - ReleaseNotes $releaseNotes
289
302
Update-ChangeLog - Content $changeLog - RootPath $rootPath
303
+ Update-Image - Releases - ReleaseProps " $rootPath \docker\config\release.props" - AzVersion $newVersion
290
304
}
291
305
}
Original file line number Diff line number Diff line change @@ -16,17 +16,16 @@ param(
16
16
[string ]$DOCKER ,
17
17
18
18
[Parameter (Mandatory = $true )]
19
- [string ]$IMAGENAME
19
+ [string ]$DockerImageName
20
20
)
21
21
22
- # #TODO:read version from file
23
- $version = 12345
22
+ $version = (Get-Content " $DOCKER /config/release.props" | Select-String " az.version" ).ToString().Split(" =" )[1 ]
24
23
25
24
try {
26
25
foreach ($dockerfile in (Get-ChildItem - Path $DOCKER - Filter " Dockerfile-*" ).FullName) {
27
26
$os = $dockerfile.split (" Dockerfile-" )[1 ]
28
27
Write-Output $os
29
- docker build - t $IMAGENAME ' :' $version " -" $os -f $dockerfile $DOCKER
28
+ docker build -- build-arg VERSION = $version - t $DockerImageName ' :' $version " -" $os -f $dockerfile $DOCKER
30
29
}
31
30
} catch {
32
31
$Errors = $_
You can’t perform that action at this time.
0 commit comments