Skip to content

Commit

Permalink
Update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiospizzi committed Jul 20, 2017
1 parent c5334b9 commit 25a52ae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
22 changes: 12 additions & 10 deletions build.psake.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,21 @@ Task Clean -depends Init -requiredVariables ReleasePath, TestPath, AnalyzePath {
}

# Compile C# solutions
Task Compile -depends Clean -requiredVariables SourcePath, SourceNames, MSBuildPath {
Task Compile -depends Clean -requiredVariables SourceEnabled, SourcePath, SourceNames, MSBuildPath {

if (Test-Path -Path $SourcePath)
if (!$SourceEnabled)
{
if ($Env:Path -notlike "*$MSBuildPath*")
{
$Env:Path = "$MSBuildPath;$Env:Path"
}
return
}

foreach ($sourceName in $SourceNames)
{
MSBuild.exe "$SourcePath\$sourceName.sln" /target:Build /p:Configuration=Release
}
if ($Env:Path -notlike "*$MSBuildPath*")
{
$Env:Path = "$MSBuildPath;$Env:Path"
}

foreach ($sourceName in $SourceNames)
{
MSBuild.exe "$SourcePath\$sourceName.sln" /target:Build /p:Configuration=Release
}
}

Expand Down
5 changes: 3 additions & 2 deletions build.settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Properties {
$ModulePath = Join-Path -Path $PSScriptRoot -ChildPath 'Modules'
$ModuleNames = Get-ChildItem -Path $ModulePath | Select-Object -ExpandProperty 'BaseName' -First 1

$SourcePath = Join-Path -Path $PSScriptRoot -ChildPath 'Sources'
$SourceNames = Get-ChildItem -Path $SourcePath -Filter '*.sln' | Select-Object -ExpandProperty 'BaseName' -First 1
$SourceEnabled = $true
$SourcePath = Join-Path -Path $PSScriptRoot -ChildPath 'Sources'
$SourceNames = Get-ChildItem -Path $SourcePath -Filter '*.sln' | Select-Object -ExpandProperty 'BaseName' -First 1

$ReleasePath = Join-Path -Path $PSScriptRoot -ChildPath 'bin'

Expand Down

0 comments on commit 25a52ae

Please sign in to comment.