8000 reverting directory · ModuleBuild/ModuleBuild@401c0e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 401c0e3

Browse files
committed
reverting directory
1 parent 536ea49 commit 401c0e3

16 files changed

+26
-121
lines changed

release/0.2.3/ModuleBuild.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Zachary Loeber
55
#
6-
# Generated on: 4/1/2018
6+
# Generated on: 3/19/2018
77
#
88

99
@{

release/0.2.3/ModuleBuild.psm1

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,7 @@ function Add-PublicFunction {
14461446
dynamicparam {
14471447
# Create dictionary
14481448
$DynamicParameters = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary
1449-
$BuildPath = (Get-ChildItem -File -Filter "*.buildenvironment.json" -Path '.\','..\','.\build\' | Select-Object -First 1).FullName
1449+
$BuildPath = (Get-ChildItem -File -Filter "*.buildenvironment.json" -Path '.\','..\','.\build\' | select -First 1).FullName
14501450

14511451
if ((Test-Path $BuildPath) -and ($BuildPath -like "*.buildenvironment.json")) {
14521452
try {
@@ -1485,7 +1485,7 @@ function Add-PublicFunction {
14851485
# Attempt to get the build environment data and create our template lookup table
14861486
try {
14871487
$BuildEnvInfo = Get-BuildEnvironment
1488-
$BuildEnvPath = Split-Path (Split-Path ((Get-ChildItem -File -Filter "*.buildenvironment.json" -Path '.\','..\','.\build\' -ErrorAction:SilentlyContinue | Select-Object -First 1).FullName))
1488+
$BuildEnvPath = Split-Path (Split-Path ((Get-ChildItem -File -Filter "*.buildenvironment.json" -Path '.\','..\','.\build\' -ErrorAction:SilentlyContinue | select -First 1).FullName))
14891489
$PublicFunctionSrc = Join-Path $BuildEnvPath $BuildEnvInfo.PublicFunctionSource
14901490
$TemplatePath = Join-Path $BuildEnvPath $BuildEnvInfo.FunctionTemplates
14911491
$TemplateLookup = @{}
@@ -1556,7 +1556,7 @@ function Get-BuildEnvironment {
15561556
process {
15571557
# If no path was specified take a few guesses
15581558
if ([string]::IsNullOrEmpty($Path)) {
1559-
$Path = (Get-ChildItem -File -Filter "*.buildenvironment.json" -Path '.\','..\','.\build\' | Select-Object -First 1).FullName
1559+
$Path = (Get-ChildItem -File -Filter "*.buildenvironment.json" -Path '.\','..\','.\build\' | select -First 1).FullName
15601560

15611561
if ([string]::IsNullOrEmpty($Path)) {
15621562
throw 'Unable to locate a *.buildenvironment.json file to parse!'
@@ -1622,9 +1622,9 @@ function Import-ModulePrivateFunction {
16221622
}
16231623

16241624
Write-Verbose "Source Module Base Path = $SourceModuleBasePath"
1625-
$AllSourcefiles = @(Get-ChildItem -Path $SourceModuleBasePath -Directory -Exclude $ExcludePaths | Get-ChildItem -File -Recurse) | Where-Object {($_.Name -notmatch $ExFiles) -and (@('.ps1','.psm1') -contains $_.extension)}
1625+
$AllSourcefiles = @(Get-ChildItem -Path $SourceModuleBasePath -Directory -Exclude $ExcludePaths | Get-ChildItem -File -Recurse) | Where {($_.Name -notmatch $ExFiles) -and (@('.ps1','.psm1') -contains $_.extension)}
16261626

1627-
$AllSourcefiles += @(Get-ChildItem -Path $SourceModuleBasePath -File | Where-Object {(@('.ps1','.psm1') -contains $_.extension) -and ($_.Name -notmatch $ExFiles)})
1627+
$AllSourcefiles += @(Get-ChildItem -Path $SourceModuleBasePath -File | Where {(@('.ps1','.psm1') -contains $_.extension) -and ($_.Name -notmatch $ExFiles)})
16281628

16291629
$PSBoundParameters.Confirm = $true
16301630

@@ -1633,7 +1633,7 @@ function Import-ModulePrivateFunction {
16331633
process {
16341634
# If no build file path was specified take a few guesses
16351635
if ([string]::IsNullOrEmpty($Path)) {
1636-
$Path = (Get-ChildItem -File -Filter "*.buildenvironment.json" -Path '.\','..\','.\build\' | Select-Object -First 1).FullName
1636+
$Path = (Get-ChildItem -File -Filter "*.buildenvironment.json" -Path '.\','..\','.\build\' | select -First 1).FullName
16371637

16381638
if ([string]::IsNullOrEmpty($Path)) {
16391639
throw 'Unable to locate a *.buildenvironment.json file to parse!'
@@ -1661,7 +1661,7 @@ function Import-ModulePrivateFunction {
16611661
Get-Content -Path $SourceFile.FullName | Get-Function | ForEach-Object {
16621662
if ((-not $_.IsEmbedded) -and ($PublicFunctions -notcontains $_.Name) -and ($_.Name -like $Name)) {
16631663
Write-Verbose "Adding private function definition for $($_.Name)"
1664-
$PrivateFunctions += $_ | Select-Object Name,Definition,@{n='SourcePath';e={$SourceFile.FullName}}
1664+
$PrivateFunctions += $_ | Select Name,Definition,@{n='SourcePath';e={$SourceFile.FullName}}
16651665
}
16661666
}
16671667
}
@@ -1732,7 +1732,7 @@ function Import-ModulePublicFunction {
17321732
process {
17331733
# If no path was specified take a few guesses
17341734
if ([string]::IsNullOrEmpty($Path)) {
1735-
$Path = (Get-ChildItem -File -Filter "*.buildenvironment.json" -Path '.\','..\','.\build\' | Select-Object -First 1).FullName
1735+
$Path = (Get-ChildItem -File -Filter "*.buildenvironment.json" -Path '.\','..\','.\build\' | select -First 1).FullName
17361736

17371737
if ([string]::IsNullOrEmpty($Path)) {
17381738
throw 'Unable to locate a *.buildenvironment.json file to parse!'
@@ -1801,19 +1801,12 @@ function Initialize-ModuleBuild {
18011801
[CmdletBinding()]
18021802
param(
18031803
[parameter(Position = 0, ValueFromPipeline = $TRUE)]
1804-
[String]$Path,
1805-
[parameter(Position = 1)]
1806-
[String]$SourceModule
1804+
[String]$Path
18071805
)
18081806
begin {
18091807
if ($script:ThisModuleLoaded -eq $true) {
18101808
Get-CallerPreference -Cmdlet $PSCmdlet -SessionState $ExecutionContext.SessionState
18111809
}
1812-
if (-not [string]::IsNullOrEmpty($SourceModule)) {
1813-
<#
1814-
1815-
#>
1816-
}
18171810
}
18181811
process {
18191812
$CustomPlasterModulePath = Join-Path $MyModulePath 'plaster\PlasterModule\Plaster.psd1'
@@ -1829,30 +1822,13 @@ A few items to consider doing next:
18291822
7. If you enabled sensitive terminology scanning then review and update your terms defined in your buildenvironment.json file (using get-buildenvironment & set-buildenvironment).
18301823
8. Change your project logo at src\other\powershell-project.png
18311824
9. Build your project with .\Build.ps1
1832-
10. Enter a PowerShell Gallery (aka Nuget) API key using Set-BuildEnvironment -NugetAPIKey. Without this you will not be able to upload your module to the Gallery
1825+
10. Enter a PowerShell Gallery (aka Nuget) API key. Without this you will not be able to upload your module to the Gallery using Set-BuildEnvironment -NugetAPIKey
18331826
18341827
Run Update-Module ModuleBuild every so often to get more recent releases of this project.
18351828
18361829
Enjoy!
18371830
'@
18381831

1839-
if (-not [string]::IsNullOrEmpty($SourceModule)) {
1840-
if (-not (test-path $SourceModule) -or ($SourceModule -notmatch '*.psd1')) {
1841-
throw 'SourceModule was not found or is not a psd1 module manifest file!'
1842-
}
1843-
1844-
$ExistingModuleManifest = Test-ModuleManifest $SourceModule
1845-
1846-
$ModuleProps = @{
1847-
TemplatePath = Join-Path $MyModulePath 'plaster\ModuleBuild\';
1848-
ModuleName = $ExistingModuleManifest.Name;
1849-
ModuleDescription = $ExistingModuleManifest.Description;
1850-
ModuleAuthor = $ExistingModuleManifest.Author;
1851-
ModuleWebsite = $ExistingModuleManifest.ProjectURI.ToString();
1852-
ModuleVersion = $ExistingModuleManifest.Version.ToString();
1853-
ModuleTags = $ExistingModuleManifest.Tags -join ',';
1854-
}
1855-
}
18561832
$PlasterParams = @{
18571833
TemplatePath = Join-Path $MyModulePath 'plaster\ModuleBuild\'
18581834
}
@@ -1879,6 +1855,7 @@ Enjoy!
18791855
$strCommand = "powershell -noprofile -WindowStyle hidden -file '$($BuildDefinition.FullName)'"
18801856

18811857
try {
1858+
18821859
Invoke-Expression $strCommand
18831860
}
18841861
catch {
@@ -1912,7 +1889,7 @@ function Set-BuildEnvironment {
19121889
# Create dictionary
19131890
$DynamicParameters = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary
19141891
if ([String]::isnullorempty($Path)) {
1915-
$BuildPath = (Get-ChildItem -File -Filter "*.buildenvironment.json" -Path '.\','..\','.\build\' | Select-Object -First 1).FullName
1892+
$BuildPath = (Get-ChildItem -File -Filter "*.buildenvironment.json" -Path '.\','..\','.\build\' | select -First 1).FullName
19161893
}
19171894
else {
19181895
$BuildPath = $Path
@@ -1949,7 +1926,7 @@ function Set-BuildEnvironment {
19491926
Get-CallerPreference -Cmdlet $PSCmdlet -SessionState $ExecutionContext.SessionState
19501927
}
19511928
if ([String]::isnullorempty($Path)) {
1952-
$BuildPath = (Get-ChildItem -File -Filter "*.buildenvironment.json" -Path '.\','..\','.\build\' | Select-Object -First 1).FullName
1929+
$BuildPath = (Get-ChildItem -File -Filter "*.buildenvironment.json" -Path '.\','..\','.\build\' | select -First 1).FullName
19531930
}
19541931
else {
19551932
$BuildPath = $Path

release/0.2.3/docs/Initialize-ModuleBuild.md

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ Set up the framework for a ModuleBuild project.
1313
## SYNTAX
1414

1515
```
16-
Initialize-ModuleBuild [[-Path] <String>] [[-SourceModule] <String>] [<CommonParameters>]
16+
Initialize-ModuleBuild [[-Path] <String>] [<CommonParameters>]
1717
```
1818

1919
## DESCRIPTION
2020
Set up the framework for a ModuleBuild project.
21-
Optionally supply an existing module manifest path to pull in information from it to begin a migration to ModuleBuild.
2221

2322
## EXAMPLES
2423

@@ -27,17 +26,6 @@ Optionally supply an existing module manifest path to pull in information from i
2726
Initialize-ModuleBuild -Path C:\Work\NewModule
2827
```
2928

30-
Prompt for all the settings required to get a new modulebuild project setup in c:\work\NewModule.
31-
32-
### EXAMPLE 2
33-
```
34-
Initialize-ModuleBuild -Path C:\Work\NewModule -SourceModule c:\work\myoldmodule\myoldmodule.psd1
35-
```
36-
37-
Pulls some information from myoldmodule.psd1 and then prompt for any remaining required information to create a modulebuild based project from it in C:\Work\NewModule
38-
39-
Prompt for all the settings required to get a new modulebuild project setup in c:\work\NewModule.
40-
4129
## PARAMETERS
4230

4331
### -Path
@@ -55,21 +43,6 @@ Accept pipeline input: True (ByValue)
5543
Accept wildcard characters: False
5644
```
5745
58-
### -SourceModule
59-
If specified, will import a source module manifest file for module information.
60-
61-
```yaml
62-
Type: String
63-
Parameter Sets: (All)
64-
Aliases:
65-
66-
Required: False
67-
Position: 2
68-
Default value: None
69-
Accept pipeline input: False
70-
Accept wildcard characters: False
71-
```
72-
7346
### CommonParameters
7447
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
7548
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

release/0.2.3/docs/ModuleBuild.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: ModuleBuild
3-
Module Guid: 8f6090b4-6411-4949-a717-96d64a1cc5b3 8f6090b4-6411-4949-a717-96d64a1cc5b3
3+
Module Guid: 8f6090b4-6411-4949-a717-96d64a1cc5b3
44
Download Help Link: https://github.com/zloeber/ModuleBuild/release/ModuleBuild/docs/ModuleBuild.md
55
Help Version: 0.2.3
66
Locale: en-US

release/0.2.3/en-US/ModuleBuild-help.xml

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@
603603
</maml:description>
604604
</command:details>
605605
<maml:description>
606-
<maml:para>Set up the framework for a ModuleBuild project. Optionally supply an existing module manifest path to pull in information from it to begin a migration to ModuleBuild.</maml:para>
606+
<maml:para>Set up the framework for a ModuleBuild project.</maml:para>
607607
</maml:description>
608608
<command:syntax>
609609
<command:syntaxItem>
@@ -620,18 +620,6 @@
620620
</dev:type>
621621
<dev:defaultValue>None</dev:defaultValue>
622622
</command:parameter>
623-
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
624-
<maml:name>SourceModule</maml:name>
625-
<maml:Description>
626-
<maml:para>If specified, will import a source module manifest file for module information.</maml:para>
627-
</maml:Description>
628-
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
629-
<dev:type>
630-
<maml:name>String</maml:name>
631-
<maml:uri />
632-
</dev:type>
633-
<dev:defaultValue>None</dev:defaultValue>
634-
</command:parameter>
635623
</command:syntaxItem>
636624
</command:syntax>
637625
<command:parameters>
@@ -647,18 +635,6 @@
647635
</dev:type>
648636
<dev:defaultValue>None</dev:defaultValue>
649637
</command:parameter>
650-
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
651-
<maml:name>SourceModule</maml:name>
652-
<maml:Description>
653-
<maml:para>If specified, will import a source module manifest file for module information.</maml:para>
654-
</maml:Description>
655-
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
656-
<dev:type>
657-
<maml:name>String</maml:name>
658-
<maml:uri />
659-
</dev:type>
660-
<dev:defaultValue>None</dev:defaultValue>
661-
</command:parameter>
662638
</command:parameters>
663639
<command:inputTypes />
664640
<command:returnValues />
@@ -672,15 +648,7 @@
672648
<maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
673649
<dev:code>Initialize-ModuleBuild -Path C:\Work\NewModule</dev:code>
674650
<dev:remarks>
675-
<maml:para>Prompt for all the settings required to get a new modulebuild project setup in c:\work\NewModule.</maml:para>
676-
</dev:remarks>
677-
</command:example>
678-
<command:example>
679-
<maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title>
680-
<dev:code>Initialize-ModuleBuild -Path C:\Work\NewModule -SourceModule c:\work\myoldmodule\myoldmodule.psd1</dev:code>
681-
<dev:remarks>
682-
<maml:para>Pulls some information from myoldmodule.psd1 and then prompt for any remaining required information to create a modulebuild based project from it in C:\Work\NewModule</maml:para>
683-
<maml:para>Prompt for all the settings required to get a new modulebuild project setup in c:\work\NewModule.</maml:para>
651+
<maml:para></maml:para>
684652
</dev:remarks>
685653
</command:example>
686654
</command:examples>

release/0.2.3/plaster/ModuleBuild/plasterManifest.xml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
templateType="Project" xmlns="http://www.microsoft.com/schemas/PowerShell/Plaster/v1">
55
<metadata>
66
<name>ModuleBuild</name>
7-
<id>c0ce518c-f894-4114-91f9-d49945d9dfb1</id>
8-
<version>0.0.1</version>
7+
<id>b2caad12-ce60-4081-8486-7cf6cc3da58f</id>
8+
<version>0.0.8</version>
99
<title>New ModuleBuild Project</title>
1010
<description>Create a new PowerShell Module with a ModuleBuild wrapper</description>
1111
<author>Zachary Loeber</author>
@@ -254,8 +254,5 @@
254254
<templateFile
255255
source="scaffold\build\docs\Additional\*"
256256
destination="docs" />
257-
<templateFile
258-
source="scaffold\build\docs\ReadTheDocs\*"
259-
destination="build\docs\ReadTheDocs" />
260257
</content>
261258
</plasterManifest>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Note
1+
# Note
22
Any ps1 files in this directory are run at the end of your build. These should only include post build clean up tasks.

release/0.2.3/plaster/ModuleBuild/scaffold/build/docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Any *.md file within the Additional folder will be automatically copied to the final doc folder at the root of the project directory.
33

44
## ReadTheDocs Manifest Creation
5-
See the README.md file within the ReadTheDocs folder for more information.
5+
Each folder in this path becomes its own subsection within the ReadTheDocs YML manifest file. This only covers the base folder and all the *.md files within it (so no subfolders will be recognized). Each public function you have in this module will automatically be included in this manifest file under a 'Function' section and do not need to be specified (as they will be automatically generated by PlatyPS).

release/0.2.3/plaster/ModuleBuild/scaffold/build/docs/ReadTheDocs/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

release/0.2.3/plaster/ModuleBuild/scaffold/modulename.build.template

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
[switch]$Force
1010
)
1111

12+
# Basic indented descriptive build output.
1213
Function Write-Description {
13-
# Basic indented descriptive build output. $Description can contain Newlines.
14-
Param (
14+
param (
1515
[string]$color = 'White',
1616
[string]$Description = '',
1717
[int]$Level = 0,
@@ -22,12 +22,11 @@ Function Write-Description {
2222
)
2323

2424
$thisindent = (' ' * $indent) * $level
25-
If ($accent) {
25+
if ($accent) {
2626
$accentleft = $AccentL
2727
$accentright = $AccentR
2828
}
29-
30-
$Description -split '\r\n|\n' | ForEach-Object { Write-Build $color "$accentleft$thisindent$($_)$accentright" }
29+
Write-Build $color "$accentleft$thisindent$Description$accentright"
3130
}
3231

3332
if (Test-Path $BuildFile) {

release/0.2.3/plaster/PlasterContent.ps1

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,5 @@ $Content = @(
167167
ContentType = 'templateFile'
168168
Source = 'scaffold\build\docs\Additional\*'
169169
Destination = 'docs'
170-
},
171-
@{
172-
ContentType = 'templateFile'
173-
Source = 'scaffold\build\docs\ReadTheDocs\*'
174-
Destination = 'build\docs\ReadTheDocs'
175170
}
176171
)

0 commit comments

Comments
 (0)
0