Permalink
Browse files

Minor fixes to build scripts to support restructure

  • Loading branch information...
1 parent 79efb43 commit 32ca72aa837f3d99f0ef9b72c9fb39ad2ab1d0da @chelnak chelnak committed Dec 23, 2016
Showing with 4 additions and 25 deletions.
  1. +4 −10 build.psake.ps1
  2. +0 −15 build.settings.ps1
View
@@ -15,8 +15,8 @@ Task PrepareRelease -depends Build, BumpVersion
Task Analyze {
- $Results = Invoke-ScriptAnalyzer -Path $ModuleDirectory -Recurse -Settings $ScriptAnalyzerSettingsPath -Verbose:$VerbosePreference
- $Results | Select RuleName, Severity, ScriptName, Line, Message | Format-List
+ $Results = Invoke-ScriptAnalyzer -Path $ModuleDirectory -Recurse -Settings $ScriptAnalyzerSettingsPath -Verbose:$VerbosePreference
+ $Results | Select-Object RuleName, Severity, ScriptName, Line, Message | Format-List
switch ($ScriptAnalysisFailBuildOnSeverityLevel) {
@@ -54,7 +54,7 @@ Task UpdateModuleManifest {
try {
- $PublicFunctions = Get-ChildItem -Path "$($ModuleDirectory)\Functions\Public" -Filter "*.psm1" -Recurse | Sort-Object
+ $PublicFunctions = Get-ChildItem -Path "$($ModuleDirectory)\Functions\Public" -Filter "*.ps1" -Recurse | Sort-Object
$ModuleManifest = Import-PowerShellDataFile -Path $ModuleManifestPath -Verbose:$VerbosePreference
@@ -116,7 +116,6 @@ Task UpdateDocumentation {
}
-
New-Item $DocsDirectory -ItemType Directory | Out-Null
# --- ErrorAction set to SilentlyContinue so this command will not overwrite an existing MD file.
@@ -137,7 +136,7 @@ Task UpdateDocumentation {
}
- $Functions = $ModuleInfo.ExportedCommands.Keys | % {" - $($_) : $($_).md"}
+ $Functions = $ModuleInfo.ExportedCommands.Keys | ForEach-Object {" - $($_) : $($_).md"}
$Template = @"
---
@@ -168,11 +167,7 @@ Task BumpVersion {
[Int]$MinorVersion = $CurrentModuleVersion.Split(".")[1]
[Int]$PatchVersion = $CurrentModuleVersion.Split(".")[2]
- $ModuleManifest.ScriptsToProcess = $ModuleManifest.ScriptsToProcess | ForEach-Object {$_}
$ModuleManifest.FunctionsToExport = $ModuleManifest.FunctionsToExport | ForEach-Object {$_}
- $ModuleManifest.NestedModules = $ModuleManifest.NestedModules | ForEach-Object {$_}
- $ModuleManifest.RequiredModules = $ModuleManifest.RequiredModules | ForEach-Object {$_}
- $ModuleManifest.ModuleList = $ModuleManifest.ModuleList | ForEach-Object {$_}
if ($ModuleManifest.ContainsKey("PrivateData") -and $ModuleManifest.PrivateData.ContainsKey("PSData")) {
@@ -198,7 +193,6 @@ Task BumpVersion {
$ModuleManifest.Remove("PrivateData")
}
-
switch ($BumpVersion) {
'MAJOR' {
View
@@ -4,20 +4,6 @@
Properties {
-# ----------------------- Module properties --------------------------------
-
- # --- Author of this module
- [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
- $ModuleAuthor = 'Jakku Labs'
-
- # --- Company or vendor of this module
- [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
- $ModuleCompanyName = 'Jakku Labs'
-
- # --- Copyright statement for this module
- [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
- $ModuleCopyright = '(c) 2016 Jakku Labs. All rights reserved.'
-
# ----------------------- Basic properties --------------------------------
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
@@ -60,5 +46,4 @@ Properties {
[System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
$ResultsFile = "$($PSScriptRoot)\Pester.Results-$(Get-Date -Format ddMMyyyHHMMSS).json"
-
}

0 comments on commit 32ca72a

Please sign in to comment.