Skip to content

Commit

Permalink
Remove whitespace [Gun.io WhitespaceBot]
Browse files Browse the repository at this point in the history
  • Loading branch information
Gun.io Whitespace Robot committed Oct 28, 2011
1 parent dc79ac9 commit 99d08b4
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 48 deletions.
22 changes: 11 additions & 11 deletions Lib/Psake/examples/checkvariables.ps1
Expand Up @@ -5,30 +5,30 @@

FormatTaskName "[{0}]"

Task default -Depends Verify
Task default -Depends Verify

Task Verify -Description "This task verifies psake's variables" {
$assertions = @(
Task Verify -Description "This task verifies psake's variables" {

$assertions = @(
((Test-Path 'variable:\psake'), "'psake' variable was not exported from module"),
(($variable:psake.ContainsKey("build_success")), "psake variable does not contain 'build_success'"),
(($variable:psake.ContainsKey("version")), "psake variable does not contain 'version'"),
(($variable:psake.ContainsKey("build_script_file")), "psake variable does not contain 'build_script_file'"),
(($variable:psake.ContainsKey("framework_version")), "psake variable does not contain 'framework_version'"),
(($variable:psake.ContainsKey("framework_version")), "psake variable does not contain 'framework_version'"),
((!$variable:psake.build_success), 'psake.build_success should be $false'),
((![string]::IsNullOrEmpty($variable:psake.version)), 'psake.version was null or empty'),
(($variable:psake.build_script_file -ne $null), '$psake.build_script_file was null'),
(($variable:psake.build_script_file -ne $null), '$psake.build_script_file was null'),
(($variable:psake.build_script_file.Name -eq "checkvariables.ps1"), ("psake variable: {0} was not equal to 'VerifyVariables.ps1'" -f $psake.build_script_file.Name)),
((![string]::IsNullOrEmpty($variable:psake.framework_version)), 'psake variable: $psake.framework_version was null or empty'),
(($variable:psake.context.Peek().tasks.Count -ne 0), 'psake variable: $tasks had length zero'),
(($variable:psake.context.Peek().properties.Count -ne 0), 'psake variable: $properties had length zero'),
(($variable:psake.context.Peek().includes.Count -eq 0), 'psake variable: $includes should have had length zero'),
(($variable:psake.context.Peek().formatTaskNameString -ne ""), 'psake variable: $formatTaskNameString was not set correctly'),
(($variable:psake.context.Peek().currentTaskName -eq "Verify"), 'psake variable: $currentTaskName was not set correctly')
(($variable:psake.context.Peek().currentTaskName -eq "Verify"), 'psake variable: $currentTaskName was not set correctly')
)

foreach ($assertion in $assertions)
{
Assert ( $assertion[0] ) $assertion[1]
}
{
Assert ( $assertion[0] ) $assertion[1]
}
}
6 changes: 3 additions & 3 deletions Lib/Psake/examples/default.ps1
Expand Up @@ -6,15 +6,15 @@ properties {

task default -depends Test

task Test -depends Compile, Clean {
task Test -depends Compile, Clean {
$testMessage
}

task Compile -depends Clean {
task Compile -depends Clean {
$compileMessage
}

task Clean {
task Clean {
$cleanMessage
}

Expand Down
6 changes: 3 additions & 3 deletions Lib/Psake/examples/formattaskname_scriptblock.ps1
Expand Up @@ -11,14 +11,14 @@ formatTaskName {
write-host $taskName -foregroundcolor Green
}

task Test -depends Compile, Clean {
task Test -depends Compile, Clean {
$testMessage
}

task Compile -depends Clean {
task Compile -depends Clean {
$compileMessage
}

task Clean {
task Clean {
$cleanMessage
}
6 changes: 3 additions & 3 deletions Lib/Psake/examples/formattaskname_string.ps1
Expand Up @@ -8,14 +8,14 @@ task default -depends Test

formatTaskName "-------{0}-------"

task Test -depends Compile, Clean {
task Test -depends Compile, Clean {
$testMessage
}

task Compile -depends Clean {
task Compile -depends Clean {
$compileMessage
}

task Clean {
task Clean {
$cleanMessage
}
2 changes: 1 addition & 1 deletion Lib/Psake/examples/nested.ps1
Expand Up @@ -13,5 +13,5 @@ Task RunNested2 {
}

Task CheckX{
Assert ($x -eq 1) '$x was not 1'
Assert ($x -eq 1) '$x was not 1'
}
6 changes: 3 additions & 3 deletions Lib/Psake/examples/preandpostaction.ps1
@@ -1,13 +1,13 @@
task default -depends Test

task Test -depends Compile, Clean -PreAction {"Pre-Test"} -Action {
task Test -depends Compile, Clean -PreAction {"Pre-Test"} -Action {
"Test"
} -PostAction {"Post-Test"}

task Compile -depends Clean {
task Compile -depends Clean {
"Compile"
}

task Clean {
task Clean {
"Clean"
}
4 changes: 2 additions & 2 deletions Lib/Psake/specs/bad_PreAndPostActions_should_fail.ps1
Expand Up @@ -2,10 +2,10 @@ task default -depends Test

task Test -depends Compile, Clean -PreAction {"Pre-Test"} -PostAction {"Post-Test"}

task Compile -depends Clean {
task Compile -depends Clean {
"Compile"
}

task Clean {
task Clean {
"Clean"
}
2 changes: 1 addition & 1 deletion Lib/Psake/specs/nested_builds_should_pass.ps1
Expand Up @@ -13,5 +13,5 @@ Task RunNested2 {
}

Task CheckX{
Assert ($x -eq 1) '$x was not 1'
Assert ($x -eq 1) '$x was not 1'
}
6 changes: 3 additions & 3 deletions Lib/Psake/specs/simple_properties_and_tasks_should_pass.ps1
Expand Up @@ -6,14 +6,14 @@ properties {

task default -depends Test

task Test -depends Compile, Clean {
task Test -depends Compile, Clean {
$testMessage
}

task Compile -depends Clean {
task Compile -depends Clean {
$compileMessage
}

task Clean {
task Clean {
$cleanMessage
}
6 changes: 3 additions & 3 deletions Lib/Psake/specs/using_PreAndPostActions_should_pass.ps1
@@ -1,13 +1,13 @@
task default -depends Test

task Test -depends Compile, Clean -PreAction {"Pre-Test"} -Action {
task Test -depends Compile, Clean -PreAction {"Pre-Test"} -Action {
"Test"
} -PostAction {"Post-Test"}

task Compile -depends Clean {
task Compile -depends Clean {
"Compile"
}

task Clean {
task Clean {
"Clean"
}
10 changes: 5 additions & 5 deletions Lib/Psake/specs/writing_psake_variables_should_pass.ps1
Expand Up @@ -4,23 +4,23 @@

FormatTaskName "[{0}]"

task default -depends Verify
task default -depends Verify

task Verify -description "This task verifies psake's variables" {

#Verify the exported module variables
cd variable:
Assert (Test-Path "psake") "variable psake was not exported from module"

Assert ($psake.ContainsKey("build_success")) "psake variable does not contain 'build_success'"
Assert ($psake.ContainsKey("version")) "psake variable does not contain 'version'"
Assert ($psake.ContainsKey("build_script_file")) "psake variable does not contain 'build_script_file'"
Assert ($psake.ContainsKey("framework_version")) "psake variable does not contain 'framework_version'"
Assert ($psake.ContainsKey("build_script_dir")) "psake variable does not contain 'build_script_dir'"
Assert ($psake.ContainsKey("build_script_dir")) "psake variable does not contain 'build_script_dir'"

Assert (!$psake.build_success) 'psake.build_success should be $false'
Assert ($psake.version) 'psake.version was null or empty'
Assert ($psake.build_script_file) '$psake.build_script_file was null'
Assert ($psake.build_script_file) '$psake.build_script_file was null'
Assert ($psake.build_script_file.Name -eq "writing_psake_variables_should_pass.ps1") ("psake variable: {0} was not equal to 'writing_psake_variables_should_pass.ps1'" -f $psake.build_script_file.Name)
Assert ($psake.build_script_dir) 'psake variable: $psake.build_script_dir was null or empty'
Assert ($psake.framework_version) 'psake variable: $psake.framework_version was null or empty'
Expand Down
18 changes: 9 additions & 9 deletions Source/BuildSupport/default.ps1
Expand Up @@ -17,17 +17,17 @@ task default -depends Compile, Test
task Init {
# clean build artifacts
delete_directory $build_dir
create_directory $test_dir
create_directory $test_dir
set-location $source_dir
get-childitem * -include *.dll -recurse | remove-item
get-childitem * -include *.pdb -recurse | remove-item
get-childitem * -include *.exe -recurse | remove-item
set-location $base_dir

create_directory $build_dir

msbuild /t:clean /property:"Configuration=Debug" /nologo /verbosity:m $source_dir\$projectName.sln

create-commonAssemblyInfo $asmInfo
}

Expand Down Expand Up @@ -57,14 +57,14 @@ function global:zip_directory($directory,$file) {
}

function global:copy_website_files($source,$destination){
$exclude = @('*.user','*.dtd','*.tt','*.cs','*.csproj','*.orig', '*.log')
$exclude = @('*.user','*.dtd','*.tt','*.cs','*.csproj','*.orig', '*.log')
copy_files $source $destination $exclude
delete_directory ""$destination\obj""
}

function global:copy_files($source,$destination,$exclude=@()){
function global:copy_files($source,$destination,$exclude=@()){
create_directory $destination
Get-ChildItem $source -Recurse -Exclude $exclude | Copy-Item -Destination {Join-Path $destination $_.FullName.Substring($source.length)}
Get-ChildItem $source -Recurse -Exclude $exclude | Copy-Item -Destination {Join-Path $destination $_.FullName.Substring($source.length)}
}

function global:Copy_and_flatten ($source,$filter,$dest) {
Expand All @@ -83,7 +83,7 @@ function global:copy_all_assemblies_for_test($destination){
}

function global:delete_file($file) {
if($file) { remove-item $file -force -ErrorAction SilentlyContinue | out-null }
if($file) { remove-item $file -force -ErrorAction SilentlyContinue | out-null }
}

function global:delete_directory($directory_name)
Expand Down Expand Up @@ -116,5 +116,5 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCulture("""")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion(""$version"")]
[assembly: AssemblyFileVersion(""$version"")]" | out-file $filename -encoding "UTF8"
[assembly: AssemblyFileVersion(""$version"")]" | out-file $filename -encoding "UTF8"
}
2 changes: 1 addition & 1 deletion Source/BuildSupport/psake_runner.bat
@@ -1 +1 @@
powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "& { Import-Module '.\lib\psake\psake.psm1'; invoke-psake .\Source\BuildSupport\default.ps1 -t %1 ; if ($lastexitcode -ne 0) {write-host "ERROR: $lastexitcode" -fore RED; exit $lastexitcode} }"
powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "& { Import-Module '.\lib\psake\psake.psm1'; invoke-psake .\Source\BuildSupport\default.ps1 -t %1 ; if ($lastexitcode -ne 0) {write-host "ERROR: $lastexitcode" -fore RED; exit $lastexitcode} }"

0 comments on commit 99d08b4

Please sign in to comment.