Skip to content

Commit 536ea49

Browse files
committed
renamed functions. bumped buildtools, bumped module build to 0.3.0
1 parent caf1fd4 commit 536ea49

File tree

181 files changed

+4455
-2751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+4455
-2751
lines changed

ModuleBuild.build.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ task RemoveScriptSignatures {
228228

229229
if ($Script:BuildEnv.OptionCombineFiles) {
230230
Write-Description White 'Remove script signatures from all files' -Level 2
231-
Get-ChildItem -Path "$($ScratchPath)\$($Script:BuildEnv.BaseSourceFolder)" -Recurse -File | ForEach-Object {Remove-Signature -FilePath $_.FullName}
231+
Get-ChildItem -Path "$($ScratchPath)\$($Script:BuildEnv.BaseSourceFolder)" -Recurse -File | ForEach-Object {Remove-MBTSignature -FilePath $_.FullName}
232232
}
233233
}
234234

@@ -483,7 +483,7 @@ task InsertCBHInPublicFunctions {
483483
$FullFilePath = $_.FullName
484484
Write-Description White "Public function - $($FileName)" -level 2
485485
$currscript = Get-Content $FullFilePath -Raw
486-
$CBH = $currscript | New-CommentBasedHelp
486+
$CBH = $currscript | New-MBTCommentBasedHelp
487487
$currscriptblock = [scriptblock]::Create($currscript)
488488
. $currscriptblock
489489
if([string]::IsNullOrEmpty($CBH))
@@ -625,7 +625,7 @@ task PushVersionRelease {
625625
$null = Remove-Item $ThisReleasePath -Force -Recurse -ErrorAction 0
626626
$null = New-Item $ThisReleasePath -ItemType:Directory -Force
627627
Copy-Item -Path "$($StageReleasePath)\*" -Destination $ThisReleasePath -Recurse
628-
#Out-Zip $StageReleasePath (Join-Path $ReleasePath "$($Script:BuildEnv.ModuleToBuild)-$($Script:BuildEnv.ModuleVersion).zip") -overwrite
628+
#Out-MBTZip $StageReleasePath (Join-Path $ReleasePath "$($Script:BuildEnv.ModuleToBuild)-$($Script:BuildEnv.ModuleVersion).zip") -overwrite
629629
}
630630
# Synopsis: Create the current release directory and copy this build to it.
631631
task PushCurrentRelease {
@@ -648,7 +648,7 @@ task PushCurrentRelease {
648648
$null = Remove-Item $CurrentReleasePath -Force -Recurse -ErrorAction 0
649649
$null = New-Item $CurrentReleasePath -ItemType:Directory -Force
650650
Copy-Item -Path "$($StageReleasePath)\*" -Destination $CurrentReleasePath -Recurse -force
651-
Out-Zip $StageReleasePath "$ReleasePath\$($Script:BuildEnv.ModuleToBuild)-current.zip" -overwrite
651+
Out-MBTZip $StageReleasePath "$ReleasePath\$($Script:BuildEnv.ModuleToBuild)-current.zip" -overwrite
652652
}
653653
else {
654654
Write-Warning 'Unable to push this version as a current release as it is not the most recent version in the release directory! Re-run this task with the -Force flag to overwrite it.'
@@ -675,7 +675,7 @@ task InstallModule VersionCheck, {
675675
$CurrentModulePath = Join-Path $Script:BuildEnv.BaseReleaseFolder $Script:BuildEnv.ModuleVersion
676676
assert (Test-Path $CurrentModulePath) 'The current version module has not been built yet!'
677677

678-
$MyModulePath = "$((Get-SpecialPaths)['MyDocuments'])\WindowsPowerShell\Modules\"
678+
$MyModulePath = "$((Get-MBTSpecialPath)['MyDocuments'])\WindowsPowerShell\Modules\"
679679
$ModuleInstallPath = "$($MyModulePath)$($Script:BuildEnv.ModuleToBuild)"
680680
if (Test-Path $ModuleInstallPath) {
681681
Write-Description White "Removing installed module $($Script:BuildEnv.ModuleToBuild)" -Level 2
@@ -723,7 +723,7 @@ task PublishPSGallery LoadRequiredModules, InstallModule, {
723723
Import-Module -Name $CurrentModule
724724

725725
Write-Description White "Uploading project to PSGallery: $($Script:BuildEnv.ModuleToBuild)"
726-
Upload-ProjectToPSGallery -Name $Script:BuildEnv.ModuleToBuild -NuGetApiKey $Script:BuildEnv.NuGetApiKey
726+
Publish-MBTProjectToPSGallery -Name $Script:BuildEnv.ModuleToBuild -NuGetApiKey $Script:BuildEnv.NuGetApiKey
727727
}
728728

729729
else {

ModuleBuild.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'ModuleBuild.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.2.4'
15+
ModuleVersion = '0.3.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()

build/dependencies/PSDepend/build.depend.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
source = 'PSGalleryModule'
2121
}
2222
ModuleBuildToolsTemp = @{
23-
version = '0.0.1'
23+
version = '0.0.3'
2424
source = 'PSGalleryModule'
2525
}
2626
}

build/docs/Additional/ChangeLog.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Project Site: [https://github.com/zloeber/ModuleBuild](https://github.com/zloebe
2323
- Fixed the missing documentation platyps output to show the actual found line that indicates missing CBH.
2424

2525
## Version 0.1.9
26-
- Removed plaster option to choose to combine the module source at build time (and simply made that behavior the default that can be changed later via Set-BuildEnvironment -OptionCombineFiles $false)
26+
- Removed plaster option to choose to combine the module source at build time (and simply made that behavior the default that can be changed later via Set-MBTBuildEnvironment -OptionCombineFiles $false)
2727
- Added option to run a code health report (via PSCodeHealth) against your public and private function directories prior to starting the build
2828
- Added 'Module plugin' capability. This adds base functionality to the module project itself. The first included module plugin is the nlogmodule logging functionality.
2929

@@ -34,7 +34,7 @@ Project Site: [https://github.com/zloeber/ModuleBuild](https://github.com/zloebe
3434
## Version 0.1.5
3535
- Fixed awful .gitignore settings included in the default scaffolding
3636
- Fixed documentation links to be self-referencing
37-
- Removed AdditionalModulePaths from initial plaster manifest (can just set this with set-buildenvironment after creation)
37+
- Removed AdditionalModulePaths from initial plaster manifest (can just set this with Set-MBTBuildEnvironment after creation)
3838

3939
## Version 0.1.4
4040
- Fixed invalid mkdocs.yml license link reference
@@ -46,7 +46,7 @@ Project Site: [https://github.com/zloeber/ModuleBuild](https://github.com/zloebe
4646

4747
## Version 0.1.2
4848
- Updated vs code task names
49-
- Fixed an issue with a null build environment variable causing dynamic parameters in set-buildenvironment to fail
49+
- Fixed an issue with a null build environment variable causing dynamic parameters in Set-MBTBuildEnvironment to fail
5050
- Several small scaffolding clean ups.
5151

5252
## Version 0.1.1

build/docs/ReadTheDocs/Usage/1 - Initialization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ With your new module folder all created there are several steps still left to ta
2323
4. Doing ReadTheDocs integration? Cool, update .\build\docs\ReadTheDocs by creating folders representing sections and putting markdown files within them for the pages within those sections.
2424
5. But remember that the markdown files in .\build\docs\Additional need some love too. These get dropped into your project .\docs directory at every build (overwriting anything there in the process!)
2525
6. Update any bits within your *.psd1 that are appropriate to your module but don't mess with the exported function names as those get handled automatically when you do the build.
26-
7. If you enabled sensitive terminology scanning then review and update your terms defined in your buildenvironment.json file (using get-buildenvironment & set-buildenvironment).
26+
7. If you enabled sensitive terminology scanning then review and update your terms defined in your buildenvironment.json file (using Get-MBTBuildEnvironment & Set-MBTBuildEnvironment).
2727
8. Build your project with by running .\Build.ps1, running the build task in VS Code, or running Invoke-Build at your project root.
2828
9. If you have ReadTheDocs integration enabled make sure to re-organize the generated mkdocs.yml to be ordered how you like before pushing your code to github.

build/docs/ReadTheDocs/Usage/5 - Publish A Release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ If you have plans to upload your module to the PowerShell Gallery then this buil
33

44
Once you have attained your API key you will need to update your build configuration file with it. From witin your project root directory do the following:
55

6-
`Set-BuildEnvironment -NugetAPIKey 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'`
6+
`Set-MBTBuildEnvironment -NugetAPIKey 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'`
77

88
Now when you are ready to upload to the psgallery simply run the following:
99

build/docs/ReadTheDocs/Usage/9 - ModuleBuild Configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Each project has a ModuleBuild configuration file that will get dot sourced into
33

44
**build\ModuleName.buildenvironment.ps1** - The initial dot sourced configuration script for your project. This file gets pulled into the build session at each invocation. You **MUST** update this file if you want to share any build settings with the community at large.
55

6-
**build\ModuleName.buildenvironment.json** - This gets automatically updated after a first run of the build and will forever after be the single source of truth moving forward for your build settings (unless you run the prior buildenvironment.ps1 script with the -ForcePersist option or update the 'FirstRun' option to be $true). This file is setup to be ignored in the git config file that the project includes so it should be considered a generally safe place to keep things like your Nuget API key or other local settings. There is little preventing you from adding additional settings here manually. When added they will automatically be available within the set-buildenvironment and get-buildenvironment commands included with this module.
6+
**build\ModuleName.buildenvironment.json** - This gets automatically updated after a first run of the build and will forever after be the single source of truth moving forward for your build settings (unless you run the prior buildenvironment.ps1 script with the -ForcePersist option or update the 'FirstRun' option to be $true). This file is setup to be ignored in the git config file that the project includes so it should be considered a generally safe place to keep things like your Nuget API key or other local settings. There is little preventing you from adding additional settings here manually. When added they will automatically be available within the Set-MBTBuildEnvironment and Get-MBTBuildEnvironment commands included with this module.
77

88
You can add items directly to this file if you like and they will be loaded and are able the be read and set with the modulebuild module. Additionally, if there are new settings in the buildenvironment.ps1 BuildEnv definitions then those settings will automatically be saved to this file when detected (so when the next build runs). This is further described in the next section.
99

@@ -22,10 +22,10 @@ What this means is that effectively the base settings defined in modulename.buil
2222
# Helper Functions
2323
There are a few functions you can use to update or view the configuration (if you are not willing to update the json file manually that is).
2424

25-
## Get-BuildEnvironment
25+
## Get-MBTBuildEnvironment
2626
Use this against a .buildenvironment.json file to pull in and display all the settings within as a psobject. If you don't specify a json file then it will attempt to guess the correct one to use based on the current directory.
2727

28-
## Set-BuildEnvironment
28+
## Set-MBTBuildEnvironment
2929
Use this against a .buildenvironment.json file to set any of the settings within. Dynamic parameters are used to ensure that this function is effectively forward compatible with any new settings/features/changes to the buildenvironment definitions. If you don't specify a json file then it will attempt to guess the correct one to use based on the current directory.
3030

3131
## Import-ModulePublicFunction

0 commit comments

Comments
 (0)