diff --git a/BuildTools/update-assemblyinfo.ps1 b/BuildTools/update-assemblyinfo.ps1 index f021a331d..9350425f3 100644 --- a/BuildTools/update-assemblyinfo.ps1 +++ b/BuildTools/update-assemblyinfo.ps1 @@ -53,7 +53,7 @@ function gitCommitHash() { if (No-Git) { return "0000000000000000000000000000000000000000"; } - return (git rev-list "$baseCommit..HEAD") | Select -First 1; + return (git rev-list --max-count 1 HEAD); } function gitBranch() { @@ -150,7 +150,7 @@ try { $out = $out.Replace('$INSERTVERSIONNAMEPOSTFIX$', $postfixVersionName); $out = $out.Replace('$INSERTBUILDCONFIG$', $buildConfig); - if (((Get-Content $file.Input) -Join [System.Environment]::NewLine) -ne $out) { + if (((Get-Content $file.Output) -Join [System.Environment]::NewLine) -ne $out) { $out | Out-File -Encoding utf8 $file.Output; } } @@ -174,7 +174,7 @@ try { $out = $out.Replace('$INSERTVERSIONNAMEPOSTFIX$', $postfixVersionName); $out = $out.Replace('$INSERTBUILDCONFIG$', $buildConfig); - if (((Get-Content $file.Input) -Join [System.Environment]::NewLine) -ne $out) { + if (((Get-Content $file.Output) -Join [System.Environment]::NewLine) -ne $out) { $out | Out-File -Encoding utf8 $file.Output; } } diff --git a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj index 59445b080..b8ae5a34d 100644 --- a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj +++ b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj @@ -640,13 +640,25 @@ + + + powershell -NoProfile -ExecutionPolicy Bypass -File BuildTools/update-assemblyinfo.ps1 $(Configuration) + git rev-parse HEAD^^{commit} pwsh -NoProfile -ExecutionPolicy Bypass -File BuildTools/update-assemblyinfo.ps1 $(Configuration) + git rev-parse HEAD^{commit} - + + + + + + + + \ No newline at end of file