Skip to content

Remove redundant/outdated build scripts and cleanup #1011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jul 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 0 additions & 233 deletions .build.ps1

This file was deleted.

8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't think that comments were allowed in JSON

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, per JSON standard, you are right but it's no problem for VSCode, similar comments are also in the .vscode folder of the PowerShell Core repo

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok!

// for the documentation about the extensions.json format
"recommendations": [
"ms-vscode.PowerShell",
"ms-vscode.csharp"
]
}
7 changes: 5 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// Place your settings in this file to overwrite default and user settings.
{
"editor.tabSize": 4,
"powershell.codeFormatting.preset": "Allman"
}
"powershell.codeFormatting.preset": "Allman",
"[powershell]": {
"files.trimTrailingWhitespace": true
}
}
4 changes: 2 additions & 2 deletions Utils/RuleMaker.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Function Get-SolutionRoot
Function Get-RuleProjectRoot
{
$slnRoot = Get-SolutionRoot
if ($slnRoot -eq $null)
if ($null -eq $slnRoot)
{
return $null
}
Expand All @@ -43,7 +43,7 @@ Function Get-RuleProjectRoot
Function Get-RuleProjectFile
{
$prjRoot = Get-RuleProjectRoot
if ($prjRoot -eq $null)
if ($null -eq $prjRoot)
{
return $null
}
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ environment:
# cache Nuget packages and dotnet CLI cache
cache:
- '%USERPROFILE%\.nuget\packages -> appveyor.yml'
- '%LocalAppData%\Microsoft\dotnet -> appveyor.yml'

install:
- ps: if ($env:PowerShellEdition -eq 'WindowsPowerShell') { Import-Module .\tools\appveyor.psm1; Invoke-AppveyorInstall }
Expand Down
27 changes: 0 additions & 27 deletions build.cmd

This file was deleted.

27 changes: 3 additions & 24 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# 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.
[CmdletBinding()]
param(

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

[Parameter(ParameterSetName='Build')]
[switch] $BuildSolution = $false,

[Parameter(ParameterSetName='Build')]
[switch] $CleanSolution = $false,

[Parameter(ParameterSetName='Build')]
[switch] $BuildDocs = $false,

Expand Down Expand Up @@ -63,27 +58,11 @@ if (-not (Test-Path $solutionPath))
throw $errMsg
}

$buildCmd = Join-Path $projectRoot "build.cmd"
if (-not (Test-Path $buildCmd))
{
throw "cannot find build.cmd"
}

if ($CleanOutput)
{
Remove-Item -Recurse $outPath\* -Force -Verbose:$verbosity
}

if ($CleanSolution)
{
& $buildCmd $solutionPath $Configuration 'clean'
}

if ($BuildSolution)
{
& $buildCmd $solutionPath $Configuration
}

if ($BuildDocs)
{
$docsPath = Join-Path $projectRoot 'docs'
Expand All @@ -98,7 +77,7 @@ if ($BuildDocs)
{
"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"
}
if ((Get-Module platyPS -Verbose:$verbosity) -eq $null)
if ($null -eq (Get-Module platyPS -Verbose:$verbosity))
{
Import-Module platyPS -Verbose:$verbosity
}
Expand All @@ -111,7 +90,7 @@ if ($BuildDocs)

# Appveyor errors out due to $profile being null. Hence...
$moduleRootPath = "$HOME/Documents/WindowsPowerShell/Modules"
if ($profile -ne $null)
if ($null -ne $profile)
{
$moduleRootPath = Join-Path (Split-Path $profile) 'Modules'
}
Expand Down
9 changes: 2 additions & 7 deletions buildCoreClr.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[string]$Configuration = "Debug"
)

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

if ($build)
{

Write-Progress "Building Engine"
Push-Location Engine\
dotnet build Engine.csproj --framework $Framework --configuration $Configuration
Pop-Location

Write-Progress "Building for framework $Framework, configuration $Configuration"
# The Rules project has a dependency on the Engine therefore just building the Rules project is enough
Push-Location Rules\
dotnet build Rules.csproj --framework $Framework --configuration $Configuration
Pop-Location
Expand Down
Loading