iai-peer-group-strategies/Build.ps1

#
# SailPoint Identity Security API - IAI Peer Group Strategies
# Use these APIs to interact with the SailPoint Identity Security platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs.
# Version: v1
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

function Get-FunctionsToExport {
    [CmdletBinding()]
    Param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
        [ValidateNotNullOrEmpty()]
        [Alias('FullName')]
        $Path
    )

    Process {
        $Token = $null
        $ParserErr = $null

        $Ast = [System.Management.Automation.Language.Parser]::ParseFile(
            $Path,
            [ref]$Token,
            [ref]$ParserErr
        )

        if ($ParserErr) {
            throw $ParserErr
        } else {
            foreach ($name in 'Begin', 'Process', 'End') {
                foreach ($Statement in $Ast."${name}Block".Statements) {
                    if (
                        [String]::IsNullOrWhiteSpace($Statement.Name) -or
                        $Statement.Extent.ToString() -notmatch
                        ('function\W+{0}' -f $Statement.Name)
                    ) {
                        continue
                    }

                    $Statement.Name
                }
            }
        }
    }
}

$ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path
$FunctionPath = "$PSScriptRoot/src/PSSailpoint.IaiPeerGroupStrategies/Api", "$PSScriptRoot/src/PSSailpoint.IaiPeerGroupStrategies/Client","$PSScriptRoot/src/PSSailpoint.IaiPeerGroupStrategies/Model" | ForEach-Object { $_ }


$Manifest = @{
    Path = "$ScriptDir\src\PSSailpoint.IaiPeerGroupStrategies\PSSailpoint.IaiPeerGroupStrategies.psd1"

    Author = 'OpenAPI Generator Team'
    CompanyName = 'SailPoint Technologies'
    Description = 'PSSailpoint.IaiPeerGroupStrategies - the PowerShell module for SailPoint Identity Security API - IAI Peer Group Strategies'

    ModuleVersion = '2.1.75'

    RootModule = 'PSSailpoint.IaiPeerGroupStrategies.psm1'
    Guid = '5BD44935-5852-3922-973B-49B1BA9FF2C0' # Has to be static, otherwise each new build will be considered different module

    PowerShellVersion = '6.2'

    FunctionsToExport = $FunctionPath | Get-ChildItem -Filter *.ps1 | Get-FunctionsToExport

    VariablesToExport = @()
    AliasesToExport = @()
    CmdletsToExport = @()

}

New-ModuleManifest @Manifest