Skip to content

Commit 6e85ec0

Browse files
authored
Merge pull request #1011 from bergmeister/remove_build.cmd
Remove redundant/outdated build scripts and cleanup
2 parents a54a99c + 5650405 commit 6e85ec0

File tree

10 files changed

+25
-301
lines changed

10 files changed

+25
-301
lines changed

.build.ps1

Lines changed: 0 additions & 233 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
"ms-vscode.PowerShell",
6+
"ms-vscode.csharp"
7+
]
8+
}

.vscode/settings.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// Place your settings in this file to overwrite default and user settings.
22
{
33
"editor.tabSize": 4,
4-
"powershell.codeFormatting.preset": "Allman"
5-
}
4+
"powershell.codeFormatting.preset": "Allman",
5+
"[powershell]": {
6+
"files.trimTrailingWhitespace": true
7+
}
8+
}

Utils/RuleMaker.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Function Get-SolutionRoot
3333
Function Get-RuleProjectRoot
3434
{
3535
$slnRoot = Get-SolutionRoot
36-
if ($slnRoot -eq $null)
36+
if ($null -eq $slnRoot)
3737
{
3838
return $null
3939
}
@@ -43,7 +43,7 @@ Function Get-RuleProjectRoot
4343
Function Get-RuleProjectFile
4444
{
4545
$prjRoot = Get-RuleProjectRoot
46-
if ($prjRoot -eq $null)
46+
if ($null -eq $prjRoot)
4747
{
4848
return $null
4949
}

appveyor.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ environment:
1616
# cache Nuget packages and dotnet CLI cache
1717
cache:
1818
- '%USERPROFILE%\.nuget\packages -> appveyor.yml'
19-
- '%LocalAppData%\Microsoft\dotnet -> appveyor.yml'
2019

2120
install:
2221
- ps: if ($env:PowerShellEdition -eq 'WindowsPowerShell') { Import-Module .\tools\appveyor.psm1; Invoke-AppveyorInstall }

build.cmd

Lines changed: 0 additions & 27 deletions
This file was deleted.

build.ps1

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1+
# This function might be a partially out of date and only the -BuildDoc switch is guaranteed to work since it is used and needed for the build process.
12
[CmdletBinding()]
23
param(
34

45
[Parameter(ParameterSetName='Build')]
56
[ValidateSet('PSV3 Debug','PSV3 Release','Debug','Release')]
67
[string] $Configuration = 'Debug',
78

8-
[Parameter(ParameterSetName='Build')]
9-
[switch] $BuildSolution = $false,
10-
11-
[Parameter(ParameterSetName='Build')]
12-
[switch] $CleanSolution = $false,
13-
149
[Parameter(ParameterSetName='Build')]
1510
[switch] $BuildDocs = $false,
1611

@@ -63,27 +58,11 @@ if (-not (Test-Path $solutionPath))
6358
throw $errMsg
6459
}
6560

66-
$buildCmd = Join-Path $projectRoot "build.cmd"
67-
if (-not (Test-Path $buildCmd))
68-
{
69-
throw "cannot find build.cmd"
70-
}
71-
7261
if ($CleanOutput)
7362
{
7463
Remove-Item -Recurse $outPath\* -Force -Verbose:$verbosity
7564
}
7665

77-
if ($CleanSolution)
78-
{
79-
& $buildCmd $solutionPath $Configuration 'clean'
80-
}
81-
82-
if ($BuildSolution)
83-
{
84-
& $buildCmd $solutionPath $Configuration
85-
}
86-
8766
if ($BuildDocs)
8867
{
8968
$docsPath = Join-Path $projectRoot 'docs'
@@ -98,7 +77,7 @@ if ($BuildDocs)
9877
{
9978
"Cannot find required minimum version $requiredVersionOfplatyPS of platyPS. Please install it from https://www.powershellgallery.com/packages/platyPS/ using e.g. the following command: Install-Module platyPS"
10079
}
101-
if ((Get-Module platyPS -Verbose:$verbosity) -eq $null)
80+
if ($null -eq (Get-Module platyPS -Verbose:$verbosity))
10281
{
10382
Import-Module platyPS -Verbose:$verbosity
10483
}
@@ -111,7 +90,7 @@ if ($BuildDocs)
11190

11291
# Appveyor errors out due to $profile being null. Hence...
11392
$moduleRootPath = "$HOME/Documents/WindowsPowerShell/Modules"
114-
if ($profile -ne $null)
93+
if ($null -ne $profile)
11594
{
11695
$moduleRootPath = Join-Path (Split-Path $profile) 'Modules'
11796
}

buildCoreClr.ps1

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[string]$Configuration = "Debug"
1111
)
1212

13-
if ($Configuration -match "PSv3" -and $Framework -eq "netstandard2.0")
13+
if ($Configuration -match "PSv" -and $Framework -eq "netstandard2.0")
1414
{
1515
throw ("{0} configuration is not applicable to {1} framework" -f $Configuration,$Framework)
1616
}
@@ -45,13 +45,8 @@ elseif ($Configuration -match 'PSv4') {
4545

4646
if ($build)
4747
{
48-
49-
Write-Progress "Building Engine"
50-
Push-Location Engine\
51-
dotnet build Engine.csproj --framework $Framework --configuration $Configuration
52-
Pop-Location
53-
5448
Write-Progress "Building for framework $Framework, configuration $Configuration"
49+
# The Rules project has a dependency on the Engine therefore just building the Rules project is enough
5550
Push-Location Rules\
5651
dotnet build Rules.csproj --framework $Framework --configuration $Configuration
5752
Pop-Location

0 commit comments

Comments
 (0)