This repository has been archived by the owner on Aug 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 构建脚本升级为 psake 4.8 * 修复 CQP 加载失败的问题 * 将安装器需要的脚本工具和脚本全部包含。方便网络较差的使用者进行下载。
- Loading branch information
1 parent
e582eb7
commit a1bb15e
Showing
193 changed files
with
17,373 additions
and
962 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
2,265 changes: 2,265 additions & 0 deletions
2,265
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/en-US/psake.psm1-help.xml.old
Large diffs are not rendered by default.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/checkvariables.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Properties { | ||
$x = 1 | ||
$y = 2 | ||
} | ||
|
||
FormatTaskName "[{0}]" | ||
|
||
Task default -Depends Verify | ||
|
||
Task Verify -Description "This task verifies psake's variables" { | ||
|
||
Assert (Test-Path 'variable:\psake') "psake variable was not exported from module" | ||
|
||
Assert ($psake.ContainsKey("version")) "psake variable does not contain 'version'" | ||
Assert ($psake.ContainsKey("context")) "psake variable does not contain 'context'" | ||
Assert ($psake.ContainsKey("build_success")) "psake variable does not contain 'build_success'" | ||
Assert ($psake.ContainsKey("build_script_file")) "psake variable does not contain 'build_script_file'" | ||
Assert ($psake.ContainsKey("build_script_dir")) "psake variable does not contain 'build_script_dir'" | ||
|
||
Assert (![string]::IsNullOrEmpty($psake.version)) '$psake.version was null or empty' | ||
Assert ($psake.context -ne $null) '$psake.context was null' | ||
Assert (!$psake.build_success) '$psake.build_success should be $false' | ||
Assert ($psake.build_script_file -ne $null) '$psake.build_script_file was null' | ||
Assert ($psake.build_script_file.Name -eq "checkvariables.ps1") ("psake variable: {0} was not equal to 'checkvariables.ps1'" -f $psake.build_script_file.Name) | ||
Assert (![string]::IsNullOrEmpty($psake.build_script_dir)) '$psake.build_script_dir was null or empty' | ||
|
||
Assert ($psake.context.Peek().tasks.Count -ne 0) "psake context variable 'tasks' had length zero" | ||
Assert ($psake.context.Peek().properties.Count -ne 0) "psake context variable 'properties' had length zero" | ||
Assert ($psake.context.Peek().includes.Count -eq 0) "psake context variable 'includes' should have had length zero" | ||
Assert ($psake.context.Peek().config -ne $null) "psake context variable 'config' was null" | ||
|
||
Assert ($psake.context.Peek().currentTaskName -eq "Verify") 'psake variable: $currentTaskName was not set correctly' | ||
} |
14 changes: 14 additions & 0 deletions
14
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/continueonerror.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Task default -Depends TaskA | ||
|
||
Task TaskA -Depends TaskB { | ||
"Task - A" | ||
} | ||
|
||
Task TaskB -Depends TaskC -ContinueOnError { | ||
"Task - B" | ||
throw "I failed on purpose!" | ||
} | ||
|
||
Task TaskC { | ||
"Task - C" | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/default.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
properties { | ||
$testMessage = 'Executed Test!' | ||
$compileMessage = 'Executed Compile!' | ||
$cleanMessage = 'Executed Clean!' | ||
} | ||
|
||
task default -depends Test | ||
|
||
task Test -depends Compile, Clean { | ||
$testMessage | ||
} | ||
|
||
task Compile -depends Clean { | ||
$compileMessage | ||
} | ||
|
||
task Clean { | ||
$cleanMessage | ||
} | ||
|
||
task ? -Description "Helper to display task info" { | ||
Write-Documentation | ||
} |
24 changes: 24 additions & 0 deletions
24
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/formattaskname_scriptblock.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
properties { | ||
$testMessage = 'Executed Test!' | ||
$compileMessage = 'Executed Compile!' | ||
$cleanMessage = 'Executed Clean!' | ||
} | ||
|
||
task default -depends Test | ||
|
||
formatTaskName { | ||
param($taskName) | ||
write-host $taskName -foregroundcolor Green | ||
} | ||
|
||
task Test -depends Compile, Clean { | ||
$testMessage | ||
} | ||
|
||
task Compile -depends Clean { | ||
$compileMessage | ||
} | ||
|
||
task Clean { | ||
$cleanMessage | ||
} |
21 changes: 21 additions & 0 deletions
21
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/formattaskname_string.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
properties { | ||
$testMessage = 'Executed Test!' | ||
$compileMessage = 'Executed Compile!' | ||
$cleanMessage = 'Executed Clean!' | ||
} | ||
|
||
task default -depends Test | ||
|
||
formatTaskName "-------{0}-------" | ||
|
||
task Test -depends Compile, Clean { | ||
$testMessage | ||
} | ||
|
||
task Compile -depends Clean { | ||
$compileMessage | ||
} | ||
|
||
task Clean { | ||
$cleanMessage | ||
} |
8 changes: 8 additions & 0 deletions
8
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/msbuild40.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Framework "4.0" | ||
# Framework "4.0x64" | ||
|
||
task default -depends ShowMsBuildVersion | ||
|
||
task ShowMsBuildVersion { | ||
msbuild /version | ||
} |
17 changes: 17 additions & 0 deletions
17
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/nested.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Properties { | ||
$x = 1 | ||
} | ||
|
||
Task default -Depends RunNested1, RunNested2, CheckX | ||
|
||
Task RunNested1 { | ||
Invoke-psake .\nested\nested1.ps1 | ||
} | ||
|
||
Task RunNested2 { | ||
Invoke-psake .\nested\nested2.ps1 | ||
} | ||
|
||
Task CheckX{ | ||
Assert ($x -eq 1) '$x was not 1' | ||
} |
9 changes: 9 additions & 0 deletions
9
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/nested/nested1.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Properties { | ||
$x = 100 | ||
} | ||
|
||
Task default -Depends Nested1CheckX | ||
|
||
Task Nested1CheckX{ | ||
Assert ($x -eq 100) '$x was not 100' | ||
} |
9 changes: 9 additions & 0 deletions
9
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/nested/nested2.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Properties { | ||
$x = 200 | ||
} | ||
|
||
Task default -Depends Nested2CheckX | ||
|
||
Task Nested2CheckX{ | ||
Assert ($x -eq 200) '$x was not 200' | ||
} |
20 changes: 20 additions & 0 deletions
20
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/paralleltasks.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Task ParallelTask1 { | ||
"ParallelTask1" | ||
} | ||
|
||
Task ParallelTask2 { | ||
"ParallelTask2" | ||
} | ||
|
||
Task ParallelNested1andNested2 { | ||
$jobArray = @() | ||
@("ParallelTask1", "ParallelTask2") | ForEach-Object { | ||
$jobArray += Start-Job { | ||
param($scriptFile, $taskName) | ||
Invoke-psake $scriptFile -taskList $taskName | ||
} -ArgumentList $psake.build_script_file.FullName, $_ | ||
} | ||
Wait-Job $jobArray | Receive-Job | ||
} | ||
|
||
Task default -depends ParallelNested1andNested2 |
9 changes: 9 additions & 0 deletions
9
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/parameters.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
properties { | ||
$my_property = $p1 + $p2 | ||
} | ||
|
||
task default -depends TestParams | ||
|
||
task TestParams { | ||
Assert ($my_property -ne $null) "`$my_property should not be null. Run with -parameters @{'p1' = 'v1'; 'p2' = 'v2'}" | ||
} |
3 changes: 3 additions & 0 deletions
3
...aller/buildScripts/psake/4.8.0/examples/passingParametersString/build.Release.Version.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
powershell -Command "& {Import-Module .\..\..\psake.psm1; Invoke-psake .\parameters.ps1 -parameters @{"buildConfiguration"='Release';} }" | ||
|
||
Pause |
22 changes: 22 additions & 0 deletions
22
....Mahua.Installer/buildScripts/psake/4.8.0/examples/passingParametersString/parameters.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
properties { | ||
$buildOutputPath = ".\bin\$buildConfiguration" | ||
} | ||
|
||
task default -depends DoRelease | ||
|
||
task DoRelease { | ||
Assert ("$buildConfiguration" -ne $null) "buildConfiguration should not have been null" | ||
Assert ("$buildConfiguration" -eq 'Release') "buildConfiguration=[$buildConfiguration] should have been 'Release'" | ||
|
||
Write-Host "" | ||
Write-Host "" | ||
Write-Host "" | ||
Write-Host -NoNewline "Would build output into path " | ||
Write-Host -NoNewline -ForegroundColor Green "$buildOutputPath" | ||
Write-Host -NoNewline " for build configuration " | ||
Write-Host -ForegroundColor Green "$buildConfiguration" | ||
Write-Host -NoNewline "." | ||
Write-Host "" | ||
Write-Host "" | ||
Write-Host "" | ||
} |
13 changes: 13 additions & 0 deletions
13
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/preandpostaction.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
task default -depends Test | ||
|
||
task Test -depends Compile, Clean -PreAction {"Pre-Test"} -Action { | ||
"Test" | ||
} -PostAction {"Post-Test"} | ||
|
||
task Compile -depends Clean { | ||
"Compile" | ||
} | ||
|
||
task Clean { | ||
"Clean" | ||
} |
18 changes: 18 additions & 0 deletions
18
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/preandpostcondition.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
properties { | ||
$runTaskA = $false | ||
$taskBSucceded = $true | ||
} | ||
|
||
task default -depends TaskC | ||
|
||
task TaskA -precondition { $runTaskA -eq $true } { | ||
"TaskA executed" | ||
} | ||
|
||
task TaskB -postcondition { $taskBSucceded -eq $true } { | ||
"TaskB executed" | ||
} | ||
|
||
task TaskC -depends TaskA,TaskB { | ||
"TaskC executed." | ||
} |
13 changes: 13 additions & 0 deletions
13
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/properties.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
properties { | ||
$x = $null | ||
$y = $null | ||
$z = $null | ||
} | ||
|
||
task default -depends TestProperties | ||
|
||
task TestProperties { | ||
Assert ($x -ne $null) "x should not be null. Run with -properties @{'x' = '1'; 'y' = '2'}" | ||
Assert ($y -ne $null) "y should not be null. Run with -properties @{'x' = '1'; 'y' = '2'}" | ||
Assert ($z -eq $null) "z should be null" | ||
} |
14 changes: 14 additions & 0 deletions
14
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/requiredvariables.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
properties { | ||
$x = $null | ||
$y = $null | ||
$z = $null | ||
} | ||
|
||
task default -depends TestRequiredVariables | ||
|
||
# you can put arguments to task in multiple lines using ` | ||
task TestRequiredVariables ` | ||
-description "This task shows how to make a variable required to run task. Run this script with -properties @{x = 1; y = 2; z = 3}" ` | ||
-requiredVariables x, y, z ` | ||
{ | ||
} |
17 changes: 17 additions & 0 deletions
17
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/tasksetupandteardown.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
TaskSetup { | ||
"Executing task setup" | ||
} | ||
|
||
TaskTearDown { | ||
"Executing task tear down" | ||
} | ||
|
||
Task default -depends TaskB | ||
|
||
Task TaskA { | ||
"TaskA executed" | ||
} | ||
|
||
Task TaskB -depends TaskA { | ||
"TaskB executed" | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/CleanupEnvironment.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
function CleanupEnvironment { | ||
if ($psake.context.Count -gt 0) { | ||
$currentContext = $psake.context.Peek() | ||
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')] | ||
$env:PATH = $currentContext.originalEnvPath | ||
Set-Location $currentContext.originalDirectory | ||
$global:ErrorActionPreference = $currentContext.originalErrorActionPreference | ||
$psake.LoadedTaskModules = @{} | ||
$psake.ReferenceTasks = @{} | ||
[void] $psake.context.Pop() | ||
} | ||
} |
Oops, something went wrong.