Skip to content

Commit

Permalink
Add module builder
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed Sep 28, 2022
1 parent 8a649c5 commit d851e5f
Showing 1 changed file with 167 additions and 0 deletions.
167 changes: 167 additions & 0 deletions Build/Manage-Module.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
Clear-Host
Import-Module "C:\Support\GitHub\PSPublishModule\PSPublishModule.psm1" -Force

$Configuration = @{
Information = @{
ModuleName = 'PasswordSolution'
DirectoryProjects = 'C:\Support\GitHub'

Manifest = @{
# Version number of this module.
ModuleVersion = '0.0.X'
# Supported PSEditions
CompatiblePSEditions = @('Desktop', 'Core')

PowerShellVersion = '5.1'
# ID used to uniquely identify this module
GUID = 'c58ff818-1de6-4500-961c-a243c2043255'
# Author of this module
Author = 'Przemyslaw Klys'
# Company or vendor of this module
CompanyName = 'Evotec'
# Copyright statement for this module
Copyright = "(c) 2011 - $((Get-Date).Year) Przemyslaw Klys @ Evotec. All rights reserved."
# Description of the functionality provided by this module
Description = "This module allows the creation of password expiry emails for users, managers, administrators, and security according to defined templates. It's able to work with different rules allowing to fully customize who gets the email and when."
# Minimum version of the Windows PowerShell engine required by this module
Tags = 'password', 'passwordexpiry', 'activedirectory', 'windows'
# A URL to the main website for this project.
ProjectUri = 'https://github.com/EvotecIT/PasswordSolution'

# A URL to an icon representing this module.
IconUri = 'https://evotec.xyz/wp-content/uploads/2022/08/PasswordSolution.png'

RequiredModules = @(
@{ ModuleName = 'PSSharedGoods'; ModuleVersion = "Latest"; Guid = 'ee272aa8-baaa-4edf-9f45-b6d6f7d844fe' }
@{ ModuleName = 'Mailozaurr'; ModuleVersion = "Latest"; Guid = '2b0ea9f1-3ff1-4300-b939-106d5da608fa' }
@{ ModuleName = 'PSWriteHTML'; ModuleVersion = "Latest"; Guid = 'a7bdf640-f5cb-4acf-9de0-365b322d245c' }
@{ ModuleName = 'PSWriteColor'; ModuleVersion = "Latest"; Guid = '0b0ba5c5-ec85-4c2b-a718-874e55a8bc3f' }
)
ExternalModuleDependencies = @(
"ActiveDirectory"
)
}
}
Options = @{
Merge = @{
Sort = 'None'
FormatCodePSM1 = @{
Enabled = $true
RemoveComments = $false
FormatterSettings = @{
IncludeRules = @(
'PSPlaceOpenBrace',
'PSPlaceCloseBrace',
'PSUseConsistentWhitespace',
'PSUseConsistentIndentation',
'PSAlignAssignmentStatement',
'PSUseCorrectCasing'
)

Rules = @{
PSPlaceOpenBrace = @{
Enable = $true
OnSameLine = $true
NewLineAfter = $true
IgnoreOneLineBlock = $true
}

PSPlaceCloseBrace = @{
Enable = $true
NewLineAfter = $false
IgnoreOneLineBlock = $true
NoEmptyLineBefore = $false
}

PSUseConsistentIndentation = @{
Enable = $true
Kind = 'space'
PipelineIndentation = 'IncreaseIndentationAfterEveryPipeline'
IndentationSize = 4
}

PSUseConsistentWhitespace = @{
Enable = $true
CheckInnerBrace = $true
CheckOpenBrace = $true
CheckOpenParen = $true
CheckOperator = $true
CheckPipe = $true
CheckSeparator = $true
}

PSAlignAssignmentStatement = @{
Enable = $true
CheckHashtable = $true
}

PSUseCorrectCasing = @{
Enable = $true
}
}
}
}
FormatCodePSD1 = @{
Enabled = $true
RemoveComments = $false
}
Integrate = @{
ApprovedModules = @('PSSharedGoods', 'PSWriteColor', 'Connectimo', 'PSUnifi', 'PSWebToolbox', 'PSMyPassword')
}
}
Standard = @{
FormatCodePSM1 = @{

}
FormatCodePSD1 = @{
Enabled = $true
#RemoveComments = $true
}
}
ImportModules = @{
Self = $true
RequiredModules = $false
Verbose = $false
}
PowerShellGallery = @{
ApiKey = 'C:\Support\Important\PowerShellGalleryAPI.txt'
FromFile = $true
}
GitHub = @{
ApiKey = 'C:\Support\Important\GithubAPI.txt'
FromFile = $true
UserName = 'EvotecIT'
#RepositoryName = 'PSWriteHTML'
}
Documentation = @{
Path = 'Docs'
PathReadme = 'Docs\Readme.md'
}
}
Steps = @{
BuildModule = @{ # requires Enable to be on to process all of that
Enable = $true
DeleteBefore = $false
Merge = $true
MergeMissing = $true
SignMerged = $true
Releases = $true
ReleasesUnpacked = $false
RefreshPSD1Only = $false
}
BuildDocumentation = $true
ImportModules = @{
Self = $true
RequiredModules = $false
Verbose = $false
}
PublishModule = @{ # requires Enable to be on to process all of that
Enabled = $false
Prerelease = ''
RequireForce = $false
GitHub = $false
}
}
}

New-PrepareModule -Configuration $Configuration

0 comments on commit d851e5f

Please sign in to comment.