Skip to content

Commit

Permalink
Normalize line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
nightroman committed Feb 29, 2024
1 parent cb70d5d commit 780aeea
Show file tree
Hide file tree
Showing 83 changed files with 8,524 additions and 8,510 deletions.
436 changes: 219 additions & 217 deletions .build.ps1

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
# prevent converting LF to CRLF for *.sh
* text=auto

*.cmd text eol=crlf
*.sh text eol=lf

.build.ps1 text eol=lf
about_InvokeBuild.help.txt text eol=lf
Build-Checkpoint.ps1 text eol=lf
Build-Parallel.ps1 text eol=lf
Invoke-Build.ps1 text eol=lf
Resolve-MSBuild.ps1 text eol=lf
Show-TaskHelp.ps1 text eol=lf
InvokeBuild.psm1 text eol=lf
LICENSE text eol=lf
40 changes: 20 additions & 20 deletions .github/workflows/test2.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: test2

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test2:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: boot
shell: powershell
run: ./Invoke-Build.ps1 boot
- name: test
shell: cmd
run: powershell -Version 2 ./Invoke-Build.ps1 . Tests/.build.ps1
name: test2

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test2:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: boot
shell: powershell
run: ./Invoke-Build.ps1 boot
- name: test
shell: cmd
run: powershell -Version 2 ./Invoke-Build.ps1 . Tests/.build.ps1
40 changes: 20 additions & 20 deletions .github/workflows/test5.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: test5

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test5:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: boot
shell: powershell
run: ./Invoke-Build.ps1 boot
- name: test
shell: powershell
run: ./Invoke-Build.ps1 . Tests/.build.ps1
name: test5

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test5:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: boot
shell: powershell
run: ./Invoke-Build.ps1 boot
- name: test
shell: powershell
run: ./Invoke-Build.ps1 . Tests/.build.ps1
40 changes: 20 additions & 20 deletions .github/workflows/test7.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: test7

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test7:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: boot
shell: pwsh
run: ./Invoke-Build.ps1 boot
- name: test
shell: pwsh
run: ./Invoke-Build.ps1 . Tests/.build.ps1
name: test7

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test7:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: boot
shell: pwsh
run: ./Invoke-Build.ps1 boot
- name: test
shell: pwsh
run: ./Invoke-Build.ps1 . Tests/.build.ps1
88 changes: 44 additions & 44 deletions Build-JustTask.ps1
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
<#
.Synopsis
Builds just the specified tasks skipping referenced tasks.
Copyright (c) Roman Kuzmin
.Description
The script invokes Invoke-Build with the usual parameters, with at least
one task specified explicitly. The specified tasks are invoked without
their referenced tasks. This unusual scenario may be useful in special
cases like debugging or development of a particular task when its
referenced tasks are completed and may be safely skipped.
Not every task may be correctly invoked in this way. If referenced tasks
configure the build environment and variables then they must be invoked.
#>

param(
[Parameter(Position=0, Mandatory=1)][string[]]$Task,
[Parameter(Position=1)]$File,
[switch]$Safe,
[switch]$Summary
)

$ErrorActionPreference = 'Stop'
try {
${*data} = @{
Task = $Task
XBuild = {
$tasks = ${*data}.Task
foreach($_ in ${*}.All.get_Values()) {
if ($tasks -notcontains $_.Name) {
$_.If = 0
}
}
}
}

Remove-Variable Task, File, Safe, Summary
Invoke-Build @PSBoundParameters -Result ${*data}
}
catch {
if ($_.InvocationInfo.ScriptName -notmatch '\b(Invoke-Build|Build-JustTask)\.ps1$') {throw}
$PSCmdlet.ThrowTerminatingError($_)
}
<#
.Synopsis
Builds just the specified tasks skipping referenced tasks.
Copyright (c) Roman Kuzmin
.Description
The script invokes Invoke-Build with the usual parameters, with at least
one task specified explicitly. The specified tasks are invoked without
their referenced tasks. This unusual scenario may be useful in special
cases like debugging or development of a particular task when its
referenced tasks are completed and may be safely skipped.
Not every task may be correctly invoked in this way. If referenced tasks
configure the build environment and variables then they must be invoked.
#>

param(
[Parameter(Position=0, Mandatory=1)][string[]]$Task,
[Parameter(Position=1)]$File,
[switch]$Safe,
[switch]$Summary
)

$ErrorActionPreference = 'Stop'
try {
${*data} = @{
Task = $Task
XBuild = {
$tasks = ${*data}.Task
foreach($_ in ${*}.All.get_Values()) {
if ($tasks -notcontains $_.Name) {
$_.If = 0
}
}
}
}

Remove-Variable Task, File, Safe, Summary
Invoke-Build @PSBoundParameters -Result ${*data}
}
catch {
if ($_.InvocationInfo.ScriptName -notmatch '\b(Invoke-Build|Build-JustTask)\.ps1$') {throw}
$PSCmdlet.ThrowTerminatingError($_)
}
Loading

0 comments on commit 780aeea

Please sign in to comment.