Skip to content

Commit 099727b

Browse files
committed
update: change all URLs to new org url, update assertion to attempt building on powershell 5 or greater, minor fix to Plaster to fix pathing issues on Linux
1 parent b65c22b commit 099727b

39 files changed

Lines changed: 92 additions & 80 deletions
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"folders": [
3+
{
4+
"path": ".."
5+
}
6+
],
7+
"settings": {
8+
"powershell.scriptAnalysis.settingsPath": "PSScriptAnalyzerSettings.psd1"
9+
}
10+
}

.vscode/tasks.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
"command": "powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File ${workspaceRoot}\\Build.ps1 -BuildModule"
1919
},
2020
"linux": {
21-
"command": "/usr/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -BuildModule"
21+
"command": "pwsh -NoProfile -File ${workspaceRoot}/Build.ps1 -BuildModule"
2222
},
2323
"osx": {
24-
"command": "/usr/local/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -BuildModule"
24+
"command": "pwsh -NoProfile -File ${workspaceRoot}/Build.ps1 -BuildModule"
2525
},
2626
"group": {
2727
"kind": "build",
@@ -39,10 +39,10 @@
3939
"command": "powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File ${workspaceRoot}\\Build.ps1 -Test"
4040
},
4141
"linux": {
42-
"command": "/usr/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -Test"
42+
"command": "pwsh -NoProfile -File ${workspaceRoot}/Build.ps1 -Test"
4343
},
4444
"osx": {
45-
"command": "/usr/local/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -Test"
45+
"command": "pwsh -NoProfile -File ${workspaceRoot}/Build.ps1 -Test"
4646
},
4747
"group": {
4848
"kind": "build",
@@ -60,10 +60,10 @@
6060
"command": "powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File ${workspaceRoot}\\Build.ps1 -TestBuildAndInstallModule"
6161
},
6262
"linux": {
63-
"command": "/usr/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -TestBuildAndInstallModule"
63+
"command": "pwsh -NoProfile -File ${workspaceRoot}/Build.ps1 -TestBuildAndInstallModule"
6464
},
6565
"osx": {
66-
"command": "/usr/local/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -TestBuildAndInstallModule"
66+
"command": "pwsh -NoProfile -File ${workspaceRoot}/Build.ps1 -TestBuildAndInstallModule"
6767
},
6868
"group": {
6969
"kind": "build",
@@ -81,10 +81,10 @@
8181
"command": "powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File ${workspaceRoot}\\Build.ps1 -AddMissingCBH"
8282
},
8383
"linux": {
84-
"command": "/usr/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -AddMissingCBH"
84+
"command": "pwsh -NoProfile -File ${workspaceRoot}/Build.ps1 -AddMissingCBH"
8585
},
8686
"osx": {
87-
"command": "/usr/local/bin/powershell -NoProfile -File ${workspaceRoot}\\Build.ps1 -AddMissingCBH"
87+
"command": "pwsh -NoProfile -File ${workspaceRoot}/Build.ps1 -AddMissingCBH"
8888
},
8989
"group": {
9090
"kind": "build",

Install.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Run this in an administrative PowerShell prompt to install the ModuleBuild PowerShell module:
22
#
3-
# iex (New-Object Net.WebClient).DownloadString("https://github.com/zloeber/ModuleBuild/raw/master/Install.ps1")
3+
# iex (New-Object Net.WebClient).DownloadString("https://github.com/ModuleBuild/ModuleBuild/raw/master/Install.ps1")
44

55
# Some general variables
66
$ModuleName = 'ModuleBuild'
7-
$DownloadURL = 'https://github.com/zloeber/ModuleBuild/raw/master/release/ModuleBuild-current.zip'
7+
$DownloadURL = 'https://github.com/ModuleBuild/ModuleBuild/raw/master/release/ModuleBuild-current.zip'
88

99
# Download and install the module
1010
$webclient = New-Object System.Net.WebClient

ModuleBuild.build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if ($Script:BuildEnv.OptionTranscriptEnabled) {
5050
#Synopsis: Validate system requirements are met
5151
task ValidateRequirements {
5252
Write-Description White 'Validating System Requirements for Build' -accent
53-
assert ($PSVersionTable.PSVersion.Major.ToString() -eq '5') 'Powershell 5 is required for this build to function properly (you can comment this assert out if you are able to work around this requirement)'
53+
assert ($PSVersionTable.PSVersion.Major.ToString() -ge '5') 'Powershell 5 or greater is required for this build to function properly.'
5454
}
5555

5656
# Synopsis: Run pre-build scripts (such as other builds)
@@ -59,7 +59,7 @@ task PreBuildTasks {
5959
$BuildToolPath = Join-Path $BuildRoot $Script:BuildEnv.BuildToolFolder
6060
$PreBuildPath = Join-Path $BuildToolPath 'startup'
6161
# Dot source any pre build scripts.
62-
Get-ChildItem -Path $PreBuildPath -Recurse -Filter "*.ps1" -File | Foreach {
62+
Get-ChildItem -Path $PreBuildPath -Recurse -Filter "*.ps1" -File | ForEach-Object {
6363
Write-Description White "Dot sourcing pre-build script file: $($_.Name)" -level 2
6464
. $_.FullName
6565
}

ModuleBuild.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ PrivateData = @{
9898
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/ModuleBuild/ModuleBuild/raw/master/LICENSE.md'
102102

103103
# A URL to the main website for this project.
104-
ProjectUri = 'https://github.com/zloeber/ModuleBuild'
104+
ProjectUri = 'https://github.com/ModuleBuild/ModuleBuild'
105105

106106
# A URL to an icon representing this module.
107-
IconUri = 'https://github.com/zloeber/ModuleBuild/raw/master/src/other/powershell-project.png'
107+
IconUri = 'https://github.com/ModuleBuild/ModuleBuild/raw/master/src/other/powershell-project.png'
108108

109109
# ReleaseNotes of this module
110110
ReleaseNotes = '0.3.1 release'

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Powershell Gallery (PS 5.0, Preferred method)
1818
`install-module ModuleBuild -Scope:CurrentUser`
1919

2020
Manual Installation
21-
`iex (New-Object Net.WebClient).DownloadString("https://github.com/zloeber/ModuleBuild/raw/master/Install.ps1")`
21+
`iex (New-Object Net.WebClient).DownloadString("https://github.com/ModuleBuild/ModuleBuild/raw/master/Install.ps1")`
2222

2323
Or clone this repository to your local machine, extract, go to the .\releases\ModuleBuild directory
2424
and import the module to your session to test, but not install this module.
@@ -53,14 +53,16 @@ Studio Code and ensure that the PowerShell extension is installed.
5353
* [Visual Studio Code](https://code.visualstudio.com/)
5454
* [PowerShell Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell)
5555

56-
More contributing information can be found [here](https://github.com/zloeber/ModuleBuild/blob/master/docs/Contributing.md).
56+
More contributing information can be found [here](https://github.com/ModuleBuild/ModuleBuild/blob/master/docs/Contributing.md).
5757

5858
This module is tested with the PowerShell testing framework Pester. To run all tests, just start the included build script with the test param `.\Build.ps1 -test`.
5959

60-
## Other Information
60+
## Authors
61+
62+
- [Zachary Loeber](https://github.com/zloeber)
6163

62-
**Authors:**
63-
- [Zachary Loeber](https://www.the-little-things.net)
6464
- [Justin Perdok](https://github.com/justin-p)
6565

66-
**Website:** https://github.com/zloeber/ModuleBuild
66+
## Links
67+
68+
[Website](https://github.com/ModuleBuild/ModuleBuild)

build/ModuleBuild.buildenvironment.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ if ((Get-Variable 'BuildEnv' -ErrorAction:SilentlyContinue) -eq $null) {
1717
Encoding = 'utf8'
1818
ModuleToBuild = 'ModuleBuild'
1919
ModuleVersion = '0.3.0'
20-
ModuleWebsite = 'https://github.com/zloeber/ModuleBuild'
20+
ModuleWebsite = 'https://github.com/ModuleBuild/ModuleBuild'
2121
ModuleCopyright = "(c) $((get-date).Year.ToString()) Zachary Loeber. All rights reserved."
22-
ModuleLicenseURI = 'https://github.com/zloeber/ModuleBuild/LICENSE.md'
22+
ModuleLicenseURI = 'https://github.com/ModuleBuild/ModuleBuild/LICENSE.md'
2323
ModuleTags = 'scaffold, Module, Invoke-Build' -split ','
2424
ModuleAuthor = 'Zachary Loeber'
2525
ModuleDescription = 'A scaffolding framework which can be used to kickstart a generic PowerShell module project. '

build/docs/Additional/Acknowledgements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ModuleBuild Acknowledgements
22

3-
Project Site: [https://github.com/zloeber/ModuleBuild](https://github.com/zloeber/ModuleBuild)
3+
Project Site: [https://github.com/ModuleBuild/ModuleBuild](https://github.com/ModuleBuild/ModuleBuild)
44

55
This project owes some acknowledgements to other projects. Here are some other authors or projects which have made this project possible. If you believe you or a project should be included in this list please let us know.
66

build/docs/Additional/ChangeLog.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ModuleBuild Change Log
22

3-
Project Site: [https://github.com/zloeber/ModuleBuild](https://github.com/zloeber/ModuleBuild)
3+
Project Site: [https://github.com/ModuleBuild/ModuleBuild](https://github.com/ModuleBuild/ModuleBuild)
44

55
## Version 0.3.0
66

@@ -41,8 +41,8 @@ Project Site: [https://github.com/zloeber/ModuleBuild](https://github.com/zloebe
4141

4242
- Updated vscode tasks.json to fix depreciated syntax.
4343
- Fixed `-Force` switch processing on Add-MBPublicFunction to still create the function if the provided name is detected as plural.
44-
- Fixed [cleanup script modulebuild execution issue](https://github.com/zloeber/ModuleBuild/issues/5) by separating out the postbuildtask into its own Invoke-Build code block (I had done this a while ago and never rolled up the changes into the Plaster template).
45-
- Fixed a glaring issue with the PlatyPS output where any Guids were 00000000-0000-0000-0000-000000000000 instead of the actual module manifest Guid [reported via issue #6](https://github.com/zloeber/ModuleBuild/issues/6). This happens because we build the module help from the psm1 load of the module in memory, not the psd1 file as that psd1 manifest gets recreated at build time with the appropriate exported functions and such. Basically a chicken/egg scenario. For now we just manually replace the output markdown files with the correct Guid before moving on to the help file packaging.
44+
- Fixed [cleanup script modulebuild execution issue](https://github.com/ModuleBuild/ModuleBuild/issues/5) by separating out the postbuildtask into its own Invoke-Build code block (I had done this a while ago and never rolled up the changes into the Plaster template).
45+
- Fixed a glaring issue with the PlatyPS output where any Guids were 00000000-0000-0000-0000-000000000000 instead of the actual module manifest Guid [reported via issue #6](https://github.com/ModuleBuild/ModuleBuild/issues/6). This happens because we build the module help from the psm1 load of the module in memory, not the psd1 file as that psd1 manifest gets recreated at build time with the appropriate exported functions and such. Basically a chicken/egg scenario. For now we just manually replace the output markdown files with the correct Guid before moving on to the help file packaging.
4646

4747
## Version 0.2.1
4848

build/docs/Additional/Contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to ModuleBuild
22

3-
Project Site: [https://github.com/zloeber/ModuleBuild](https://github.com/zloeber/ModuleBuild)
3+
Project Site: [https://github.com/ModuleBuild/ModuleBuild](https://github.com/ModuleBuild/ModuleBuild)
44

55
There are some important things to be aware of if you plan on contributing to this project.
66

0 commit comments

Comments
 (0)