From bf90483b1e15ace8e38939a45b8684dacf86f3ce Mon Sep 17 00:00:00 2001 From: Steffen Kampmann Date: Tue, 29 Oct 2024 09:34:49 +0100 Subject: [PATCH 1/3] version bump --- CHANGELOG.md | 2 ++ src/PSDependHelper.psd1 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57676f6..dc429a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.0.3] - 2024-10-29 + ### Added - Added `Exclude` parameter to `Find-OutdatedDependency` function. diff --git a/src/PSDependHelper.psd1 b/src/PSDependHelper.psd1 index 60166dd..6a5178f 100644 --- a/src/PSDependHelper.psd1 +++ b/src/PSDependHelper.psd1 @@ -12,7 +12,7 @@ RootModule = 'PSDependHelper.psm1' # Version number of this module. -ModuleVersion = '0.0.2' +ModuleVersion = '0.0.3' # Supported PSEditions # CompatiblePSEditions = @() From 167ec819f8f1f6e314702d84c49e5677b5ecc27e Mon Sep 17 00:00:00 2001 From: Steffen Kampmann Date: Tue, 29 Oct 2024 09:37:34 +0100 Subject: [PATCH 2/3] updated psbuildtasks --- .github/workflows/build-validation.yml | 2 +- .github/workflows/pre-release.yml | 2 +- .github/workflows/release.yml | 2 +- tasks/Build.Tasks.ps1 | 35 ++++++++++---------------- 4 files changed, 16 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build-validation.yml b/.github/workflows/build-validation.yml index 8de4954..0611c06 100644 --- a/.github/workflows/build-validation.yml +++ b/.github/workflows/build-validation.yml @@ -6,4 +6,4 @@ on: jobs: build-validation: - uses: abbgrade/PsBuildTasks/.github/workflows/build-validation-matrix.yml@1.10.0 + uses: abbgrade/PsBuildTasks/.github/workflows/build-validation-matrix.yml@1.11.0 diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 01a64eb..2e594f6 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -5,7 +5,7 @@ on: jobs: pre-release: - uses: abbgrade/PsBuildTasks/.github/workflows/pre-release-windows.yml@1.10.0 + uses: abbgrade/PsBuildTasks/.github/workflows/pre-release-windows.yml@1.11.0 with: module-name: PSDependHelper secrets: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2698c2..f64e37f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ on: jobs: release: - uses: abbgrade/PsBuildTasks/.github/workflows/release-windows.yml@1.10.0 + uses: abbgrade/PsBuildTasks/.github/workflows/release-windows.yml@1.11.0 with: module-name: PSDependHelper secrets: diff --git a/tasks/Build.Tasks.ps1 b/tasks/Build.Tasks.ps1 index ab6eb22..f336148 100644 --- a/tasks/Build.Tasks.ps1 +++ b/tasks/Build.Tasks.ps1 @@ -3,7 +3,6 @@ requires ModuleName [System.IO.DirectoryInfo] $SourceDirectory = "$PsScriptRoot/../src" -[System.IO.DirectoryInfo] $PublicFunctionsDirectory = "$SourceDirectory/Public" [System.IO.DirectoryInfo] $SourceManifest = "$SourceDirectory/$ModuleName.psd1" [System.IO.DirectoryInfo] $PublishDirectory = "$PsScriptRoot/../publish" [System.IO.DirectoryInfo] $DocumentationDirectory = "$PsScriptRoot/../docs" @@ -17,7 +16,7 @@ task Clean -Jobs { # Synopsis: Import the module. task Import -Jobs { - Import-Module $SourceManifest -Force + Import-Module $SourceManifest -Force } # Synopsis: Import platyPs. @@ -26,18 +25,18 @@ task Import.platyPs -Jobs { } # Synopsis: Initialize the documentation directory. -task Doc.Init.Directory -If { $DocumentationDirectory.Exists -eq $false } -Jobs { +task Doc.Init.Directory -If { $DocumentationDirectory.Exists -eq $false} -Jobs { New-Item $DocumentationDirectory -ItemType Directory } # Synopsis: Initialize the documentation. task Doc.Init -Jobs Import, Import.platyPs, Doc.Init.Directory, { - New-MarkdownHelp -Module $ModuleName -OutputFolder $DocumentationDirectory -Force:$ForceDocInit -ErrorAction Continue + New-MarkdownHelp -Module $ModuleName -OutputFolder $DocumentationDirectory -Force:$ForceDocInit -ErrorAction Continue } # Synopsis: Update the markdown documentation. task Doc.Update -Jobs Import, Import.platyPs, Doc.Init, { - Update-MarkdownHelp -Path $DocumentationDirectory + Update-MarkdownHelp -Path $DocumentationDirectory } task PreparePublishDirectory -If ( -Not ( Test-Path $PublishDirectory )) -Jobs { @@ -50,32 +49,24 @@ task SetPrerelease -If $BuildNumber { Update-ModuleManifest -Path $Global:Manifest -Prerelease $Global:PreRelease } -# Synopsis: Set the functions to export in the manifest based on the directory structure. -task SetFunctionsToExport { - Update-ModuleManifest -Path $Global:Manifest -FunctionsToExport ( - Get-ChildItem -Path $PublicFunctionsDirectory -Filter *.ps1 | - Select-Object -ExpandProperty BaseName - ) -} - # Synopsis: Build the module. task Build -Jobs Clean, Doc.Update, PreparePublishDirectory, { Copy-Item -Path $SourceDirectory -Destination $ModulePublishDirectory -Recurse - [System.IO.FileInfo] $Global:Manifest = "$ModulePublishDirectory/$ModuleName.psd1" -}, SetPrerelease, SetFunctionsToExport + [System.IO.FileInfo] $Global:Manifest = "$ModulePublishDirectory/$ModuleName.psd1" +}, SetPrerelease # Synopsis: Install the module. task Install -Jobs Build, { - $info = Import-PowerShellDataFile $Global:Manifest - $version = ([System.Version] $info.ModuleVersion) + $info = Import-PowerShellDataFile $Global:Manifest + $version = ([System.Version] $info.ModuleVersion) $defaultModulePath = $env:PSModulePath -split ';' | Select-Object -First 1 - if ( -not $defaultModulePath ) { - Write-Error "Failed to determine default module path from `$env:PSModulePath='$( $env:PSModulePath )'" - } + if ( -not $defaultModulePath ) { + Write-Error "Failed to determine default module path from `$env:PSModulePath='$( $env:PSModulePath )'" + } Write-Verbose "install $ModuleName $version to '$defaultModulePath'" $installPath = Join-Path $defaultModulePath $ModuleName $version.ToString() - New-Item -Type Directory $installPath -Force | Out-Null - Get-ChildItem $Global:Manifest.Directory | Copy-Item -Destination $installPath -Recurse -Force + New-Item -Type Directory $installPath -Force | Out-Null + Get-ChildItem $Global:Manifest.Directory | Copy-Item -Destination $installPath -Recurse -Force } # Synopsis: Publish the module to PSGallery. From b5f8cb741bc3cbb0f84d2c0e14a64672ed17f82f Mon Sep 17 00:00:00 2001 From: Steffen Kampmann Date: Tue, 29 Oct 2024 09:53:58 +0100 Subject: [PATCH 3/3] changed manifest --- src/PSDependHelper.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PSDependHelper.psd1 b/src/PSDependHelper.psd1 index 6a5178f..df6682a 100644 --- a/src/PSDependHelper.psd1 +++ b/src/PSDependHelper.psd1 @@ -69,7 +69,7 @@ RequiredModules = 'PsdKit' # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -# FunctionsToExport = '*' +FunctionsToExport = '*' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. # CmdletsToExport = '*'