8000 Rebuild ModuleBuild with 0.3.0 · ModuleBuild/ModuleBuild@70df169 · GitHub
[go: up one dir, main page]

Skip to content

Commit 70df169

Browse files
committed
Rebuild ModuleBuild with 0.3.0
1 parent ed0c4c0 commit 70df169

File tree

195 files changed

+196
-22240
lines changed

Some content is hidden

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

195 files changed

+196
-22240
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ You may delete the guideline and text above to just leave the following details:
1212

1313
- OS: **INSERT OPERATING SYSTEM HERE**
1414
- PowerShell Version: **INSERT POWERSHELL VERSION HERE**
15-
- List the steps to reproduce the problem below (if possible attach a screenshot and/or link to the code): **LIST REPRO STEPS BELOW**
15+
- List the steps to reproduce the problem below (if possible attach a screenshot and/or link to the code): **LIST REPRO STEPS BELOW**

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ priorities of ModuleBuild's GitHub code might not match the
2323
priorities of the pull request. Don't fret, the open source community thrives on
2424
forks and GitHub makes it easy to keep your changes in a forked repo.
2525

26-
After reviewing the guidelines above you can delete this text from the pull request.
26+
After reviewing the guidelines above you can delete this text from the pull request.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ Desktop.ini
3636
$RECYCLE.BIN/
3737

3838
# Mac crap
39-
.DS_Store
39+
.DS_Store

.vscode/launch.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818
}
1919
]
2020
}
21+

.vscode/settings.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,24 @@
66

77
"search.exclude": {
88
"release": true,
9-
"temp": true
9+
"": true
1010
},
1111

12+
//-------- Indentation --------
13+
14+
// The number of spaces a tab is equal to. This setting is overridden
15+
// based on the file contents when `editor.detectIndentation` is true.
16+
"editor.tabSize": 4,
17+
// Insert spaces when pressing Tab. This setting is overriden
18+
// based on the file contents when `editor.detectIndentation` is true.
19+
"editor.insertSpaces": true,
20+
// When opening a file, `editor.tabSize` and `editor.insertSpaces`
21+
// will be detected based on the file contents. Set to false to keep
22+
// the values you've explicitly set, above.
23+
"editor.detectIndentation": false,
1224
//-------- PowerShell Configuration --------
1325

1426
// Use a custom PowerShell Script Analyzer settings file for this workspace.
1527
// Relative paths for this setting are always relative to the workspace root dir.
1628
"powershell.scriptAnalysis.settingsPath": "PSScriptAnalyzerSettings.psd1"
17-
}
29+
}

.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,4 @@
9696
}
9797
}
9898
]
99-
}
99+
}

Build.ps1

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ param (
55
[switch]$BuildModule,
66
[parameter(Position = 1,ParameterSetName = 'Build')]
77
[switch]$TestBuildAndInstallModule,
8-
[parameter(Position = 2, ParameterSetName = 'Build')]
9-
[switch]$UploadPSGallery,
10-
[parameter(Position = 3, ParameterSetName = 'Build')]
11-
[switch]$InstallAndTestModule,
12-
[parameter(Position = 4, ParameterSetName = 'Build')]
8+
[parameter(Position = 2, ParameterSetName = 'UpdateRelease')]
9+
[switch]$UpdateRelease,
10+
[parameter(Position = 3, ParameterSetName = 'UpdateRelease')]
1311
[version]$NewVersion,
14-
[parameter(Position = 5, ParameterSetName = 'Build')]
12+
[parameter(Position = 4, ParameterSetName = 'UpdateRelease')]
1513
[string]$ReleaseNotes,
14+
[parameter(Position = 5, ParameterSetName = 'UpdateRelease')]
15+
[switch]$UploadPSGallery,
1616
[parameter(Position = 6, ParameterSetName = 'CBH')]
1717
[switch]$AddMissingCBH,
1818
[parameter(Position = 7, ParameterSetName = 'Tests')]
@@ -69,90 +69,92 @@ if (-not (PrerequisitesLoaded)) {
6969
}
7070

7171
switch ($psCmdlet.ParameterSetName) {
72-
'CBH' {
73-
if ($AddMissingCBH) {
72+
'Build' {
73+
# If no parameters were specified or the build action was manually specified then kick off a standard build
74+
if (($psboundparameters.count -eq 0) -or ($BuildModule)) {
7475
try {
75-
Invoke-Build -Task AddMissingCBH
76+
Invoke-Build
7677
}
7778
catch {
78-
throw
79+
Write-Host 'Build Failed with the following error:'
80+
throw $_
7981
}
8082
}
81-
}
82-
'Tests' {
83-
if ($test) {
83+
84+
# Test, Build Installd and test load the module
85+
if ($TestBuildAndInstallModule) {
8486
try {
85-
Invoke-Build -Task tests
87+
Invoke-Build -Task TestBuildAndInstallModule
8688
}
8789
catch {
88-
throw
90+
Write-Host 'Test, Build Installd and test load the module of the module failed:'
91+
throw $_
8992
}
9093
}
91-
if ($TestMetaOnly) {
94+
}
95+
'CBH' {
96+
if ($AddMissingCBH) {
9297
try {
93-
Invoke-Build -Task RunMetaTests
98+
Invoke-Build -Task AddMissingCBH
9499
}
95100
catch {
96-
throw
101+
throw $_
97102
}
98103
}
99-
if ($TestUnitOnly) {
104+
}
105+
'UpdateRelease' {
106+
if ($UpdateRelease -ne $null) {
100107
try {
101-
Invoke-Build -Task RunUnitTests
108+
Invoke-Build -Task UpdateRelease -NewVersion $NewVersion -ReleaseNotes $ReleaseNotes
102109
}
103110
catch {
104-
throw
111+
throw $_
105112
}
106113
}
107-
if ($TestIntergrationOnly) {
114+
115+
if ($UploadPSGallery) {
108116
try {
109-
Invoke-Build -Task RunIntergrationTests
117+
Invoke-Build -Task PublishPSGallery
110118
}
111119
catch {
112-
throw
120+
throw 'Unable to upload project to the PowerShell Gallery!'
113121
}
114122
}
115123
}
116-
'Build' {
117-
# If no parameters were specified or the build action was manually specified then kick off a standard build
118-
if (($psboundparameters.count -eq 0) -or ($BuildModule)) {
124+
'Tests' {
125+
if ($test) {
119126
try {
120-
Invoke-Build
127+
Invoke-Build -Task tests
121128
}
122129
catch {
123-
Write-Host 'Build Failed with the following error:'
124-
throw $_
130+
throw
125131
}
126132
}
127-
128-
# Test, Build Installd and test load the module
129-
if ($TestBuildAndInstallModule) {
133+
if ($TestMetaOnly) {
130134
try {
131-
Invoke-Build -Task TestBuildAndInstallModule
135+
Invoke-Build -Task RunMetaTests
132136
}
133137
catch {
134-
Write-Host 'Test, Build Installd and test load the module of the module failed:'
135-
throw $_
138+
throw
136139
}
137140
}
138-
139-
if ($NewVersion -ne $null) {
141+
if ($TestUnitOnly) {
140142
try {
141-
Invoke-Build -Task UpdateVersion -NewVersion $NewVersion -ReleaseNotes $ReleaseNotes
143+
Invoke-Build -Task RunUnitTests
142144
}
143145
catch {
144-
throw $_
146+
throw
145147
}
146148
}
147-
148-
# Upload to gallery?
149-
if ($UploadPSGallery) {
149+
if ($TestIntergrationOnly) {
150150
try {
151-
Invoke-Build -Task PublishPSGallery
151+
Invoke-Build -Task RunIntergrationTests
152152
}
153153
catch {
154-
throw 'Unable to upload project to the PowerShell Gallery!'
154+
throw
155155
}
156156
}
157157
}
158158
}
159+
160+

License.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<h6><a id="user-content-you-are-free-to" class="anchor" href="#you-are-free-to" aria-hidden="true"><span class="octicon octicon-link"></span></a>You are free to:</h6>
44

5-
<p><strong>Share</strong> — copy and redistribute the material in any medium or format </p>
5+
<p><strong>Share</strong> — copy and redistribute the material in any medium or format</p>
66

77
<p><strong>Adapt</strong> — remix, transform, and build upon the material </p>
88

ModuleBuild.build.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,3 +901,4 @@ task AddMissingCBH Configure, CleanScratchDirectory, InsertCBHInPublicFunctions,
901901
task . Build
902902
#endregion
903903

904+

ModuleBuild.psd1

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#
2-
# Module manifest for module 'PSGet_ModuleBuild'
2+
# Module manifest for module 'ModuleBuild'
33
#
44
# Generated by: Zachary Loeber
55
#
6-
# Generated on: 2/4/2018
6+
# Generated on: 4/23/2020
77
#
88

99
@{
@@ -18,22 +18,22 @@ ModuleVersion = '0.3.0'
1818
# CompatiblePSEditions = @()
1919

2020
# ID used to uniquely identify this module
21-
GUID = '8f6090b4-6411-4949-a717-96d64a1cc5b3'
21+
GUID = '2b53a392-3b0f-4a7c-b934-7c995252070e'
2222

2323
# Author of this module
2424
Author = 'Zachary Loeber'
2525

2626
# Company or vendor of this module
27-
CompanyName = 'Zachary Loeber'
27+
CompanyName = ' '
2828

2929
# Copyright statement for this module
30-
Copyright = '(c) 2017 Zachary Loeber. All rights reserved.'
30+
Copyright = '(c) 2020 . All rights reserved.'
3131

3232
# Description of the functionality provided by this module
33-
Description = 'A scaffolding framework which can be used to kickstart a generic PowerShell module project.'
33+
Description = 'A scaffolding framework which can be used to kickstart a generic PowerShell module project. '
3434

3535
# Minimum version of the Windows PowerShell engine required by this module
36-
PowerShellVersion = '5.0.0'
36+
# PowerShellVersion = ''
3737

3838
# Name of the Windows PowerShell host required by this module
3939
# PowerShellHostName = ''
@@ -69,13 +69,13 @@ PowerShellVersion = '5.0.0'
6969
# NestedModules = @()
7070

7171
# 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.
72-
FunctionsToExport = @()
72+
FunctionsToExport = '*'
7373

7474
# 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.
75-
CmdletsToExport = @()
75+
CmdletsToExport = '*'
7676

7777
# Variables to export from this module
78-
# VariablesToExport = @()
78+
VariablesToExport = @()
7979

8080
# Aliases 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 aliases to export.
8181
AliasesToExport = @()
@@ -95,10 +95,10 @@ PrivateData = @{
9595
PSData = @{
9696

9797
# Tags applied to this module. These help with module discovery in online galleries.
98-
Tags = 'scaffold','Module','Invoke-Build'
98+
Tags = 'scaffold', 'Module', 'Invoke-Build'
9999

100100
# A URL to the license for this module.
101-
LicenseUri = 'https://github.com/zloeber/ModuleBuild/raw/master/license.md'
101+
LicenseUri = 'https://github.com/zloeber/ModuleBuild/raw/master/LICENSE.md'
102102

103103
# A URL to the main website for this project.
104104
ProjectUri = 'https://github.com/zloeber/ModuleBuild'
@@ -107,20 +107,11 @@ PrivateData = @{
107107
IconUri = 'https://github.com/zloeber/ModuleBuild/raw/master/src/other/powershell-project.png'
108108

109109
# ReleaseNotes of this module
110-
ReleaseNotes = '0.2.3 release'
111-
112-
# Prerelease string of this module
113-
# Prerelease = ''
114-
115-
# Flag to indicate whether the module requires explicit user acceptance for install/update
116-
# RequireLicenseAcceptance = $false
117-
118-
# External dependent modules of this module
119-
# ExternalModuleDependencies = @()
110+
# ReleaseNotes = ''
120111

121112
} # End of PSData hashtable
122113

123-
} # End of PrivateData hashtable
114+
} # End of PrivateData hashtable
124115

125116
# HelpInfo URI of this module
126117
# HelpInfoURI = ''
@@ -130,3 +121,4 @@ PrivateData = @{
130121

131122
}
132123

124+

Readme.md

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
# ModuleBuild
22

3-
A scaffolding framework which can be used to kickstart a generic PowerShell module project with a bunch of extras.
3+
A scaffolding framework which can be used to kickstart a generic PowerShell module project.
44

55
## Description
66

7-
A scaffolding framework which can be used to kickstart a generic PowerShell module project with an Invoke-Build backend for regular deployments and other automated tasks. This project helps make everything about starting, documenting, building, and eventually releasing your module to the PSGallary a breeze.
7+
A scaffolding framework which can be used to kickstart a generic PowerShell module project.
88

9-
## Requirements
10-
11-
- PowerShell 5.0
9+
## Introduction
1210

13-
- All other module requirements will be automatically installed at build time if they are not available. (This is one of the reasons PowerShell 5 or greater is required)
11+
## Requirements
1412

1513
## Installation
1614

1715
Powershell Gallery (PS 5.0, Preferred method)
18-
`install-module ModuleBuild -Scope:CurrentUser`
16+
`install-module ModuleBuild`
1917

2018
Manual Installation
2119
`iex (New-Object Net.WebClient).DownloadString("https://github.com/zloeber/ModuleBuild/raw/master/Install.ps1")`
@@ -25,24 +23,9 @@ and import the module to your session to test, but not install this module.
2523

2624
## Features
2725

28-
This build framework for PowerShell modules comes with several appealing baked in features which include;
26+
## Versions
2927

30-
- Fully portable project directory structure and build process. So portable that you can copy it to another PowerShell 5.0 capable system and it should run the same.
31-
- Automatically combine your public and private functions into one clean psm1 file at build time.
32-
- Automatically update your psd1 file with public functions at build time.
33-
- Automatically scan your module release with PSScriptAnalyzer
34-
- Automatically upload your script to the PowerShell Gallery (with appropriate API key)
35-
- Automatically create project documentation folder structure and yml definition file for ReadTheDocs.org integration
36-
- Automatically start Pester tests during build process
37-
- Visual Studio Code integration (tasks)
38-
- Easy to manage build configuration with forward compatible design and easy to use commands
39-
- Includes ability to scan for sensitive terms (like your company domain name or other items that you may not want published)
40-
- Functions for importing public and private functions from other projects into a ModuleBuild project
41-
- Add new public functions to your project based on easy to create templates.
42-
43-
## Documentation
44-
45-
Visit the [ReadTheDocs.org documentation](http://modulebuild.readthedocs.io/en/latest/) that this module created a manifest for automatically.
28+
0.0.1 - Initial Release
4629

4730
## Contribute
4831

@@ -53,14 +36,10 @@ Studio Code and ensure that the PowerShell extension is installed.
5336
* [Visual Studio Code](https://code.visualstudio.com/)
5437
* [PowerShell Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell)
5538

56-
More contributing information can be found [here](https://github.com/zloeber/ModuleBuild/blob/master/docs/Contributing.md).
57-
5839
This module is tested with the PowerShell testing framework Pester. To run all tests, just start the included build scrip with the test param `.\Build.ps1 -test`.
5940

6041
## Other Information
6142

62-
**Authors:**
63-
- [Zachary Loeber](https://www.the-little-things.net)
64-
- [Justin Perdok](https://github.com/justin-p)
43+
**Author:** Zachary Loeber
6544

6645
**Website:** https://github.com/zloeber/ModuleBuild

0 commit comments

Comments
 (0)
0