diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7aa1b64 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,28 @@ +# SPSDBMove line-ending and encoding policy +# +# PowerShell files run under Windows PowerShell 5.1 on SharePoint servers. Without a +# BOM, Windows PowerShell 5.1 reads .ps1/.psm1/.psd1 as ANSI (the system code page), +# which corrupts any non-ASCII character. We therefore store all PowerShell files as +# UTF-8 with BOM (the BOM is part of the committed content) and check them out with +# CRLF line endings (native on the target servers). +# +# YAML, Markdown and other text files must NOT carry a BOM (it breaks some YAML +# parsers and is unwanted on GitHub-rendered files); they use LF. + +* text=auto eol=lf + +# PowerShell -- committed with a UTF-8 BOM, checked out with CRLF +*.ps1 text eol=crlf +*.psm1 text eol=crlf +*.psd1 text eol=crlf + +# Workflows / docs / config -- no BOM, LF +*.yml text eol=lf +*.yaml text eol=lf +*.md text eol=lf +*.json text eol=lf + +# Binary artifacts (release ZIP, screenshots) +*.dll binary +*.png binary +*.zip binary diff --git a/scripts/SPSDBMove.ps1 b/scripts/SPSDBMove.ps1 index 74fa057..f278728 100644 --- a/scripts/SPSDBMove.ps1 +++ b/scripts/SPSDBMove.ps1 @@ -1,4 +1,4 @@ -#Requires -Version 7.0 +#Requires -Version 7.0 <# .SYNOPSIS diff --git a/tests/SPSDBMove.Tests.ps1 b/tests/SPSDBMove.Tests.ps1 index 8ea8ef5..6db5726 100644 --- a/tests/SPSDBMove.Tests.ps1 +++ b/tests/SPSDBMove.Tests.ps1 @@ -1,4 +1,4 @@ -#Requires -Version 7.0 +#Requires -Version 7.0 #Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.3.0' } <#