Browse Source

Make sure that update-assemblyinfo.ps1 fails if PowerShell >= 5.0 is not installed.

pull/2639/head
Siegfried Pammer 3 years ago
parent
commit
7019e1c02f
  1. 9
      BuildTools/update-assemblyinfo.ps1
  2. 2
      ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj
  3. 1
      README.md

9
BuildTools/update-assemblyinfo.ps1

@ -1,4 +1,9 @@ @@ -1,4 +1,9 @@
$ErrorActionPreference = "Stop"
if (-not ($PSVersionTable.PSCompatibleVersions -contains "5.0")) {
Write-Error "This script requires at least powershell version 5.0!";
return 255;
}
$ErrorActionPreference = "Stop"
$baseCommit = "d779383cb85003d6dabeb976f0845631e07bf463";
$baseCommitRev = 1;
@ -98,7 +103,7 @@ try { @@ -98,7 +103,7 @@ try {
}
if (-not (Test-File "ILSpy.sln")) {
Write-Host "Working directory must be the ILSpy repo root!";
Write-Error "Working directory must be the ILSpy repo root!";
return 2;
}

2
ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj

@ -685,7 +685,7 @@ @@ -685,7 +685,7 @@
<Exec ContinueOnError="true" WorkingDirectory=".." Command="$(GitRevParse)" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="CommitHash" />
</Exec>
<Exec WorkingDirectory=".." Command="$(UpdateAssemblyInfo)" Timeout="60000" Condition="'$(CommitHash)'!='$(LastCommitHash)'" />
<Exec WorkingDirectory=".." Command="$(UpdateAssemblyInfo)" Timeout="60000" Condition="'$(CommitHash)'!='$(LastCommitHash)'" LogStandardErrorAsError="true" ContinueOnError="false" />
<WriteLinesToFile Lines="$(CommitHash)" File="@(UpdateAssemblyInfoStamp)" Overwrite="true" Condition="'$(CommitHash)'!='$(LastCommitHash)'" />
<ReadLinesFromFile ContinueOnError="true" File="..\VERSION">
<Output TaskParameter="Lines" PropertyName="PackageVersion" />

1
README.md

@ -45,6 +45,7 @@ How to build @@ -45,6 +45,7 @@ How to build
#### Windows:
- Make sure PowerShell (at least version) 5.0 is installed.
- Clone the ILSpy repository using git.
- Execute `git submodule update --init --recursive` to download the ILSpy-Tests submodule (used by some test cases).
- Install Visual Studio (documented version: 17.1). You can install the necessary components in one of 3 ways:

Loading…
Cancel
Save