-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pipeline updated according to latest Sampler version (#7)
* Updated pipeline to latest sampler scripts * Switched to Windows PowerShell * Cleanup * Updated changelog * Added task `FixEncoding` being able to run the build on Windows PowerShell.
- Loading branch information
Showing
7 changed files
with
142 additions
and
272 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,28 @@ | ||
<# | ||
.SYNOPSIS | ||
Sets the encoding of all *.psd1 files to UTF8. | ||
.DESCRIPTION | ||
Sets the encoding of all *.psd1 files to UTF8. This is a build task that is | ||
This task is only needed when the build runs on Windows PowerShell 5.1. | ||
.NOTES | ||
This is a build task that is primarily meant to be run by Invoke-Build but | ||
wrapped by the Sampler project's build.ps1 (https://github.com/gaelcolas/Sampler). | ||
#> | ||
|
||
param () | ||
|
||
task FixEncoding { | ||
|
||
Write-Build Yellow "Setting encoding to UTF8 for *.PSD1 files in path '$BuildModuleOutput'." | ||
$utf8NoBomEncoding = New-Object System.Text.UTF8Encoding($false) | ||
|
||
Get-ChildItem -Path $BuildModuleOutput -Filter *.psd1 -Recurse -File | ForEach-Object { | ||
|
||
Write-Build DarkGray "`t'$($_.FullName)'." | ||
$c = [System.IO.File]::ReadAllLines($_.FullName) | ||
[System.IO.File]::WriteAllLines($_.FullName, $c, $utf8NoBomEncoding) | ||
} | ||
} |
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
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
Oops, something went wrong.