Skip to content

Commit 724d391

Browse files
Merge pull request #866 from StartAutomating/PipeScript-vNext
PipeScript 0.27: Intepret Anything with PipeScript
2 parents 3bd7fde + 9132d1d commit 724d391

File tree

860 files changed

+32496
-15238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

860 files changed

+32496
-15238
lines changed
Lines changed: 56 additions & 0 deletions
Loading

Assets/PipeScript-4-chevron.svg

Lines changed: 24 additions & 0 deletions
Loading

Assets/PipeScript-animated.svg

Lines changed: 38 additions & 0 deletions
Loading

Assets/PipeScript.svg

Lines changed: 3 additions & 6 deletions
Loading

Github/Actions/PipeScriptAction.ps1 renamed to Build/Github/Actions/PipeScriptAction.ps1

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ param(
1717
# Any files outputted from the script will be added to the repository.
1818
# If those files have a .Message attached to them, they will be committed with that message.
1919
[string]
20-
$PipeScript,
20+
$Script,
2121

2222
# If set, will not run Build-PipeScript.
2323
[switch]
@@ -30,9 +30,23 @@ $SkipBuild,
3030
$CommitMessage,
3131

3232
# A list of modules to be installed from the PowerShell gallery before scripts run.
33+
# Note: If ugit is not installed, commit messages will not be carried properly with multiple commits.
3334
[string[]]
3435
$InstallModule = 'ugit',
3536

37+
# If set, will build files one-by-one, instead of in parallel.
38+
[switch]
39+
$Serial,
40+
41+
# The number of files to build in each batch.
42+
[int]
43+
$BatchSize = 11,
44+
45+
# The throttle limit for parallel jobs.
46+
# If too many jobs are running at once, errors may occur.
47+
[int]
48+
$ThrottleLimit = 7,
49+
3650
# The user email associated with a git commit.
3751
[string]
3852
$UserEmail,
@@ -145,9 +159,11 @@ if (-not $branchName) {
145159
return
146160
}
147161

162+
try { git fetch --unshallow } catch { $_ | Out-Host }
163+
148164
$PipeScriptStart = [DateTime]::Now
149-
if ($PipeScript) {
150-
Invoke-PipeScript -Command $PipeScript |
165+
if ($Script) {
166+
Invoke-PipeScript -Command $Script |
151167
. $processScriptOutput |
152168
Out-Host
153169
}
@@ -159,7 +175,7 @@ $BuildPipeScriptStart = [DateTime]::Now
159175
$pipeScriptBuildErrors = $null
160176
if (-not $SkipBuild) {
161177

162-
$buildOutputFiles = @(Build-Pipescript -InputPath $env:GITHUB_WORKSPACE -ErrorVariable pipeScriptBuildErrors)
178+
$buildOutputFiles = @(Build-Pipescript -Serial:$Serial -BatchSize:$BatchSize -ThrottleLimit:$ThrottleLimit -InputPath $env:GITHUB_WORKSPACE -ErrorVariable pipeScriptBuildErrors)
163179
if ($buildOutputFiles) {
164180
"::notice:: $($buildOutputFiles.Length) files outputted" | Out-Host
165181
"$($buildOutputFiles.FullName -join [Environment]::newLine)" | Out-Host
@@ -174,9 +190,7 @@ if ($pipeScriptBuildErrors) {
174190
"::error::$($pipeScriptBuildErrors | Out-String)" | Out-Host
175191
$pipeScriptBuildErrors
176192
exit 1
177-
}
178-
179-
193+
}
180194

181195
$BuildPipeScriptEnd = [DateTime]::Now
182196
$BuildPipeScriptTook = $BuildPipeScriptEnd - $BuildPipeScriptStart

Github/Jobs/BuildPipeScript.psd1 renamed to Build/Github/Jobs/BuildPipeScript.psd1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
name = 'Check out repository'
77
uses = 'actions/checkout@v2'
88
},
9+
@{
10+
name = 'GitLogger'
11+
uses = 'GitLogging/GitLoggerAction@main'
12+
id = 'GitLogger'
13+
},
914
@{
1015
name = 'Use PSSVG Action'
1116
uses = 'StartAutomating/PSSVG@main'
@@ -23,7 +28,7 @@
2328
if = '${{github.ref_name != ''main''}}'
2429
uses = './'
2530
id = 'PipeScriptBranch'
26-
}
31+
},
2732
'RunEZOut',
2833
'RunHelpOut'
2934
)
File renamed without changes.

Build/PipeScript.GitHubAction.PSDevOps.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#requires -Module PSDevOps
22
#requires -Module PipeScript
3-
Import-BuildStep -ModuleName PipeScript
3+
Import-BuildStep -SourcePath (
4+
Join-Path $PSScriptRoot 'GitHub'
5+
) -BuildSystem GitHubAction
6+
47
Push-Location ($PSScriptRoot | Split-Path)
58
New-GitHubAction -Name "BuildPipeScript" -Description @'
69
Builds code using PipeScript

Build/PipeScript.GitHubWorkflow.PSDevOps.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#requires -Module PSDevOps,GitPub
2-
Import-BuildStep -ModuleName PipeScript
2+
Import-BuildStep -SourcePath (
3+
Join-Path $PSScriptRoot 'GitHub'
4+
) -BuildSystem GitHubWorkflow
5+
36
Push-Location ($PSScriptRoot | Split-Path)
47
New-GitHubWorkflow -Name "Analyze, Test, Tag, and Publish" -On Push,
58
PullRequest,

0 commit comments

Comments
 (0)