Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Whitespace cleanup commit
  • Loading branch information
Jaykul committed Jan 11, 2020
commit 9c0854599839520cf748f2c2c90a95fff8ccc6a9
4 changes: 2 additions & 2 deletions Source/Private/InitializeBuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ function InitializeBuild {
$ModuleInfo = Get-Module (Get-Item $BuildInfo.ModuleManifest).FullName -ListAvailable -WarningAction SilentlyContinue -ErrorAction SilentlyContinue -ErrorVariable Problems

# If there are any problems that count, fail
if ($Problems = $Problems.Where( {$_.FullyQualifiedErrorId -notmatch $ErrorsWeIgnore})) {
if ($Problems = $Problems.Where({ $_.FullyQualifiedErrorId -notmatch $ErrorsWeIgnore })) {
foreach ($problem in $Problems) {
Write-Error $problem
}
throw "Unresolvable problems in module manifest"
}

# Update the ModuleManifest with our build configuration
# Update the module manifest with our build configuration
$ModuleInfo = Update-Object -InputObject $ModuleInfo -UpdateObject $BuildInfo
$ModuleInfo = Update-Object -InputObject $ModuleInfo -UpdateObject @{ DefaultCommandPrefix = $ModuleInfo.Prefix; Prefix = "" }

Expand Down
1 change: 0 additions & 1 deletion Tests/Integration/Source1.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ Describe "Build-Module With Source1" {

Context "Regression test for #84: Multiple Aliases per command will Export" {
$Output = Build-Module $PSScriptRoot\Source1\build.psd1 -Passthru
$Module = [IO.Path]::ChangeExtension($Output.Path, "psm1")

$Metadata = Import-Metadata $Output.Path

Expand Down
38 changes: 19 additions & 19 deletions Tests/Public/Build-Module.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ Describe "Build-Module" {
# These are actually all the values that we need
[PSCustomObject]@{
OutputDirectory = "TestDrive:\1.0.0"
Name = "MyModule"
ModuleBase = "TestDrive:\MyModule\"
Name = "MyModule"
ModuleBase = "TestDrive:\MyModule\"
CopyDirectories = @()
Encoding = "UTF8"
PublicFilter = "Public\*.ps1"
Encoding = "UTF8"
PublicFilter = "Public\*.ps1"
}
}

Expand Down Expand Up @@ -162,11 +162,11 @@ Describe "Build-Module" {
# These are actually all the values that we need
[PSCustomObject]@{
OutputDirectory = "TestDrive:\1.0.0"
Name = "MyModule"
ModuleBase = "TestDrive:\MyModule\"
Name = "MyModule"
ModuleBase = "TestDrive:\MyModule\"
CopyDirectories = @()
Encoding = "UTF8"
PublicFilter = "Public\*.ps1"
Encoding = "UTF8"
PublicFilter = "Public\*.ps1"
}
}

Expand Down Expand Up @@ -227,11 +227,11 @@ Describe "Build-Module" {
# These are actually all the values that we need
[PSCustomObject]@{
OutputDirectory = "TestDrive:\$Version"
Name = "MyModule"
ModuleBase = "TestDrive:\MyModule\"
Name = "MyModule"
ModuleBase = "TestDrive:\MyModule\"
CopyDirectories = @()
Encoding = "UTF8"
PublicFilter = "Public\*.ps1"
Encoding = "UTF8"
PublicFilter = "Public\*.ps1"
}
}

Expand Down Expand Up @@ -326,8 +326,8 @@ Describe "Build-Module" {
Context "Setting the version and pre-release" {
# $SemVer = "1.0.0-beta03+sha.22c35ffff166f34addc49a3b80e622b543199cc5.Date.2018-10-11"
$SemVer = @{
Version = "1.0.0"
Prerelease = "beta03"
Version = "1.0.0"
Prerelease = "beta03"
BuildMetadata = "Sha.22c35ffff166f34addc49a3b80e622b543199cc5.Date.2018-10-11"
}
$global:ExpectedVersion = "1.0.0"
Expand All @@ -342,11 +342,11 @@ Describe "Build-Module" {
# These are actually all the values that we need
[PSCustomObject]@{
OutputDirectory = "TestDrive:\$Version"
Name = "MyModule"
ModuleBase = "TestDrive:\MyModule\"
Name = "MyModule"
ModuleBase = "TestDrive:\MyModule\"
CopyDirectories = @()
Encoding = "UTF8"
PublicFilter = "Public\*.ps1"
Encoding = "UTF8"
PublicFilter = "Public\*.ps1"
}
}

Expand Down Expand Up @@ -536,7 +536,7 @@ Describe "Build-Module" {

Mock GetBuildInfo -ModuleName ModuleBuilder {
[PSCustomObject]@{
ModuleManifest = "TestDrive:\MyModule.psd1"
SourcePath = "TestDrive:\MyModule.psd1"
Version = [Version]"1.0.0"
OutputDirectory = "./output"
Encoding = 'UTF8'
Expand Down