mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-13 01:42:29 +00:00
merge fixes
This commit is contained in:
parent
0a34a30e55
commit
a026bd84db
2 changed files with 3 additions and 31 deletions
|
|
@ -99,11 +99,7 @@ task TestPS5 {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Synopsis: Invoke Pester Tests
|
# Synopsis: Invoke Pester Tests
|
||||||
<<<<<<< HEAD
|
|
||||||
task PesterTests, {
|
|
||||||
=======
|
|
||||||
task PesterTests CreateHelp, {
|
task PesterTests CreateHelp, {
|
||||||
>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f
|
|
||||||
try {
|
try {
|
||||||
$result = Invoke-Pester -PassThru -OutputFile "$BuildRoot\TestResult.xml" -OutputFormat "NUnitXml"
|
$result = Invoke-Pester -PassThru -OutputFile "$BuildRoot\TestResult.xml" -OutputFormat "NUnitXml"
|
||||||
if ($env:APPVEYOR_PROJECT_NAME) {
|
if ($env:APPVEYOR_PROJECT_NAME) {
|
||||||
|
|
@ -122,11 +118,6 @@ task PesterTests CreateHelp, {
|
||||||
# Synopsis: Build shippable release
|
# Synopsis: Build shippable release
|
||||||
task Build GenerateRelease, ConvertMarkdown, UpdateManifest
|
task Build GenerateRelease, ConvertMarkdown, UpdateManifest
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
# Synopsis: Generate .\Release structure
|
|
||||||
task GenerateRelease, {
|
|
||||||
=======
|
|
||||||
task CreateHelp {
|
task CreateHelp {
|
||||||
Import-Module platyPS -Force
|
Import-Module platyPS -Force
|
||||||
New-ExternalHelp -Path "$BuildRoot\docs" -OutputPath "$BuildRoot\SnipeitPS\en-US" -Force
|
New-ExternalHelp -Path "$BuildRoot\docs" -OutputPath "$BuildRoot\SnipeitPS\en-US" -Force
|
||||||
|
|
@ -135,7 +126,6 @@ task CreateHelp {
|
||||||
|
|
||||||
# Synopsis: Generate .\Release structure
|
# Synopsis: Generate .\Release structure
|
||||||
task GenerateRelease CreateHelp, {
|
task GenerateRelease CreateHelp, {
|
||||||
>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f
|
|
||||||
# Setup
|
# Setup
|
||||||
if (-not (Test-Path "$releasePath\SnipeitPS")) {
|
if (-not (Test-Path "$releasePath\SnipeitPS")) {
|
||||||
$null = New-Item -Path "$releasePath\SnipeitPS" -ItemType Directory
|
$null = New-Item -Path "$releasePath\SnipeitPS" -ItemType Directory
|
||||||
|
|
@ -155,10 +145,6 @@ task GenerateRelease CreateHelp, {
|
||||||
# Synopsis: Update the manifest of the module
|
# Synopsis: Update the manifest of the module
|
||||||
task UpdateManifest GetVersion, {
|
task UpdateManifest GetVersion, {
|
||||||
Update-Metadata -Path "$releasePath\SnipeitPS\SnipeitPS.psd1" -PropertyName ModuleVersion -Value $script:Version
|
Update-Metadata -Path "$releasePath\SnipeitPS\SnipeitPS.psd1" -PropertyName ModuleVersion -Value $script:Version
|
||||||
<<<<<<< HEAD
|
|
||||||
# Update-Metadata -Path "$releasePath\SnipeitPS\SnipeitPS.psd1" -PropertyName FileList -Value (Get-ChildItem $releasePath\SnipeitPS -Recurse).Name
|
|
||||||
=======
|
|
||||||
>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f
|
|
||||||
$functionsToExport = Get-ChildItem "$BuildRoot\SnipeitPS\Public" | ForEach-Object {$_.BaseName}
|
$functionsToExport = Get-ChildItem "$BuildRoot\SnipeitPS\Public" | ForEach-Object {$_.BaseName}
|
||||||
Set-ModuleFunctions -Name "$releasePath\SnipeitPS\SnipeitPS.psd1" -FunctionsToExport $functionsToExport
|
Set-ModuleFunctions -Name "$releasePath\SnipeitPS\SnipeitPS.psd1" -FunctionsToExport $functionsToExport
|
||||||
}
|
}
|
||||||
|
|
@ -181,8 +167,6 @@ task GetVersion {
|
||||||
$newRevision
|
$newRevision
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
# Synopsis: Convert markdown files to HTML.
|
# Synopsis: Convert markdown files to HTML.
|
||||||
# <http://johnmacfarlane.net/pandoc/>
|
# <http://johnmacfarlane.net/pandoc/>
|
||||||
$ConvertMarkdown = @{
|
$ConvertMarkdown = @{
|
||||||
|
|
@ -197,7 +181,6 @@ task ConvertMarkdown -Partial @ConvertMarkdown InstallPandoc, {process {
|
||||||
exec { Tools\pandoc.exe $_ --standalone --from=markdown_github "--output=$2" }
|
exec { Tools\pandoc.exe $_ --standalone --from=markdown_github "--output=$2" }
|
||||||
}
|
}
|
||||||
}, RemoveMarkdownFiles
|
}, RemoveMarkdownFiles
|
||||||
>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f
|
|
||||||
# endregion
|
# endregion
|
||||||
|
|
||||||
# region publish
|
# region publish
|
||||||
|
|
@ -249,15 +232,9 @@ task RemoveGeneratedFiles {
|
||||||
Remove-Item $itemsToRemove -Force -Recurse -ErrorAction 0
|
Remove-Item $itemsToRemove -Force -Recurse -ErrorAction 0
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
# endregion
|
|
||||||
|
|
||||||
task . ShowDebug, Clean, Test, Build, Deploy
|
|
||||||
=======
|
|
||||||
task RemoveMarkdownFiles {
|
task RemoveMarkdownFiles {
|
||||||
Remove-Item "$releasePath\SnipeitPS\*.md" -Force -ErrorAction 0
|
Remove-Item "$releasePath\SnipeitPS\*.md" -Force -ErrorAction 0
|
||||||
}
|
}
|
||||||
# endregion
|
# endregion
|
||||||
|
|
||||||
task . ShowDebug, Clean, Test, Build, Deploy
|
task . ShowDebug, Clean, Test, Build, Deploy
|
||||||
>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f
|
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,7 @@ $manifestFile = "$moduleRoot\SnipeitPS.psd1"
|
||||||
$changelogFile = "$projectRoot\CHANGELOG.md"
|
$changelogFile = "$projectRoot\CHANGELOG.md"
|
||||||
$appveyorFile = "$projectRoot\appveyor.yml"
|
$appveyorFile = "$projectRoot\appveyor.yml"
|
||||||
$publicFunctions = "$moduleRoot\Public"
|
$publicFunctions = "$moduleRoot\Public"
|
||||||
<<<<<<< HEAD
|
#$internalFunctions = "$moduleRoot\Private"
|
||||||
$privateFunctions = "$moduleRoot\Private"
|
|
||||||
=======
|
|
||||||
$internalFunctions = "$moduleRoot\Private"
|
|
||||||
>>>>>>> 13ec3a62ac71275ec2bbe0bbf993130e9f53589f
|
|
||||||
|
|
||||||
Describe "SnipeitPS" {
|
Describe "SnipeitPS" {
|
||||||
Context "All required tests are present" {
|
Context "All required tests are present" {
|
||||||
|
|
@ -140,7 +136,7 @@ Describe "SnipeitPS" {
|
||||||
It "Appveyor version matches manifest version" {
|
It "Appveyor version matches manifest version" {
|
||||||
$appveyorVersion -as [Version] | Should Be ( $script:manifest.ModuleVersion -as [Version] )
|
$appveyorVersion -as [Version] | Should Be ( $script:manifest.ModuleVersion -as [Version] )
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
# The CI changes I'm testng now will render this section obsolete,
|
# The CI changes I'm testng now will render this section obsolete,
|
||||||
# as it should automatically patch the module manifest file with all
|
# as it should automatically patch the module manifest file with all
|
||||||
|
|
@ -202,7 +198,6 @@ Describe "SnipeitPS" {
|
||||||
throw "The following $($badLines.Count) lines contain trailing whitespace: `r`n`r`n$($badLines -join "`r`n")"
|
throw "The following $($badLines.Count) lines contain trailing whitespace: `r`n`r`n$($badLines -join "`r`n")"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
It 'Source files all end with a newline' {
|
It 'Source files all end with a newline' {
|
||||||
$badFiles = @(
|
$badFiles = @(
|
||||||
|
|
@ -228,7 +223,7 @@ Describe "SnipeitPS" {
|
||||||
It "Should pass $rule" {
|
It "Should pass $rule" {
|
||||||
If (($analysis) -and ($analysis.RuleName -contains $rule)) {
|
If (($analysis) -and ($analysis.RuleName -contains $rule)) {
|
||||||
$analysis |
|
$analysis |
|
||||||
Where RuleName -EQ $rule -OutVariable failures |
|
Where-Object RuleName -EQ $rule -OutVariable failures |
|
||||||
Out-Default
|
Out-Default
|
||||||
$failures.Count | Should Be 0
|
$failures.Count | Should Be 0
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue