OSDN Git Service

build-zip-archive.ps1 実行時に msbuild, csc のバージョンを出力する
authorKimura Youichi <kim.upsilon@bucyou.net>
Sat, 1 Oct 2022 08:20:09 +0000 (17:20 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 1 Oct 2022 10:11:14 +0000 (19:11 +0900)
Reproducible Build で問題が発生した時の調査用

tools/build-zip-archive.ps1

index a2f8087..b49a628 100644 (file)
@@ -84,6 +84,10 @@ Function Build-Package([String[]] $Path, [String] $DestPath) {
   Compress-Archive -Force -Path $Path -DestinationPath $DestPath
 }
 
+Function Get-CommandVersion([String] $Name) {
+  Get-Command -Name $Name | Select -Property Name, @{Name='ProductVersion'; Expression={$_.FileVersionInfo.ProductVersion}}
+}
+
 Generate-Serializer
 Build-SateliteAssembly -Culture en
 
@@ -95,4 +99,13 @@ Build-Package -Path $includePaths -DestPath $DestPath
 
 Write-Host
 Write-Host "Build success!"
-Get-FileHash -Algorithm SHA256 $destPath | Format-List
+@(
+  Get-CommandVersion 'msbuild.exe'
+  Get-CommandVersion 'csc.exe'
+  Get-CommandVersion 'sgen.exe'
+  [PSCustomObject]@{
+    Name = 'SOURCE_DATE_EPOCH'
+    Value = $timestamp
+  }
+  Get-FileHash -Algorithm SHA256 $destPath
+) | Format-List