Skip to content

Commit 8081e76

Browse files
daxian-dbwadityapatwardhan
authored andcommitted
Upload Build-Info Json file with the 'ReleaseDate' field (PowerShell#10986)
1 parent ef64321 commit 8081e76

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

tools/releaseBuild/azureDevOps/templates/json.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
CreateJson: yes
2222

2323
- task: AzureFileCopy@1
24-
displayName: 'upload signed msi to Azure - ${{ parameters.architecture }}'
24+
displayName: 'upload daily-build-info JSON file to Azure - ${{ parameters.architecture }}'
2525
inputs:
2626
SourcePath: '$(BuildInfoPath)'
2727
azureSubscription: '$(AzureFileCopySubscription)'

tools/releaseBuild/setReleaseTag.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function New-BuildInfoJson {
1919
[switch] $IsDaily
2020
)
2121

22-
$blobName = $ReleaseTag -replace '\.', '-'
22+
$blobName = $ReleaseTag -replace '\.', '-'
2323

2424
$isPreview = $ReleaseTag -like '*-*'
2525

@@ -33,8 +33,13 @@ function New-BuildInfoJson {
3333
$filename = 'daily.json'
3434
}
3535

36+
## Get the UTC time and round up to the second.
37+
$dateTime = [datetime]::UtcNow
38+
$dateTime = [datetime]::new($dateTime.Ticks - ($dateTime.Ticks % [timespan]::TicksPerSecond), $dateTime.Kind)
39+
3640
@{
3741
ReleaseTag = $ReleaseTag
42+
ReleaseDate = $dateTime
3843
BlobName = $blobName
3944
} | ConvertTo-Json | Out-File -Encoding ascii -Force -FilePath $filename
4045

0 commit comments

Comments
 (0)