@@ -257,21 +257,28 @@ Describe "Build-Module" {
257
257
New-Item - ItemType Directory - Path TestDrive:/ MyModule/ - Force
258
258
New-Item - ItemType Directory - Path " TestDrive:/Output/MyModule/$ExpectedVersion " - Force
259
259
260
- Mock InitializeBuild {
261
- # These are actually all the values that we need
260
+ Mock ResolveBuildManifest { " TestDrive:/MyModule/build.psd1" }
261
+
262
+ Mock GetBuildInfo {
262
263
[PSCustomObject ]@ {
263
264
OutputDirectory = " TestDrive:/Output"
264
- Name = " MyModule"
265
- Version = $Version
265
+ SourcePath = " TestDrive:/ MyModule/ "
266
+ SemVer = $SemVer
266
267
Target = $Target
267
- ModuleBase = " TestDrive:/MyModule/"
268
268
CopyPaths = @ ()
269
269
Encoding = " UTF8"
270
270
PublicFilter = " Public/*.ps1"
271
271
VersionedOutputDirectory = $true
272
272
}
273
273
}
274
274
275
+ Mock ImportModuleManifest {
276
+ [PSCustomObject ]@ {
277
+ Name = " MyModule"
278
+ ModuleBase = " TestDrive:/MyModule/"
279
+ }
280
+ }
281
+
275
282
$global :Mock_OutputPath = Convert-FolderSeparator " TestDrive:/Output/MyModule/$ExpectedVersion "
276
283
277
284
Mock Get-ChildItem {
@@ -356,22 +363,31 @@ Describe "Build-Module" {
356
363
$global :ExpectedVersion = " 1.0.0"
357
364
Push-Location TestDrive:/ - StackName BuildModuleTest
358
365
New-Item - ItemType Directory - Path TestDrive:/ MyModule/ - Force
359
- New-Item - ItemType Directory - Path " TestDrive:/Output/MyModule/ $ExpectedVersion " - Force
366
+ New-Item - ItemType Directory - Path " TestDrive:/Output/MyModule" - Force
360
367
361
- Mock InitializeBuild {
362
- # These are actually all the values that we need
368
+ Mock ResolveBuildManifest { " TestDrive:/MyModule/build.psd1" }
369
+
370
+ Mock GetBuildInfo {
363
371
[PSCustomObject ]@ {
364
372
OutputDirectory = " TestDrive:/Output"
365
- Name = " MyModule"
366
- Version = $Version
367
- Target = $Target
368
- ModuleBase = " TestDrive:/MyModule/"
369
- CopyPaths = @ ()
373
+ SourcePath = " TestDrive:/MyModule/"
374
+ Version = " 1.0.0"
375
+ Prerelease = " beta03"
376
+ BuildMetadata = " Sha.22c35ffff166f34addc49a3b80e622b543199cc5.Date.2018-10-11"
377
+ Target = " CleanBuild"
378
+ CopyPaths = @ ()
370
379
Encoding = " UTF8"
371
380
PublicFilter = " Public/*.ps1"
372
381
}
373
382
}
374
383
384
+ Mock ImportModuleManifest {
385
+ [PSCustomObject ]@ {
386
+ Name = " MyModule"
387
+ ModuleBase = " TestDrive:/MyModule/"
388
+ }
389
+ }
390
+
375
391
$global :Mock_OutputPath = Convert-FolderSeparator " TestDrive:/Output/MyModule"
376
392
Mock Get-ChildItem {
377
393
[IO.FileInfo ]" $TestDrive /MyModule/Public/Get-MyInfo.ps1"
@@ -510,20 +526,28 @@ Describe "Build-Module" {
510
526
New-Item - ItemType Directory - Path TestDrive:/ MyModule/ - Force
511
527
New-Item - ItemType Directory - Path " TestDrive:/$ExpectedVersion /" - Force
512
528
513
- Mock InitializeBuild {
529
+ Mock GetBuildInfo {
514
530
# These are actually all the values that we need
515
531
[PSCustomObject ]@ {
516
532
OutputDirectory = " TestDrive:/$Version "
517
533
Name = " MyModule"
518
534
Version = $Version
535
+ PreRelease = $PreRelease
519
536
Target = $Target
520
- ModuleBase = " TestDrive:/MyModule/"
537
+ SourcePath = " TestDrive:/MyModule/"
521
538
CopyPaths = @ ()
522
539
Encoding = " UTF8"
523
540
PublicFilter = " Public/*.ps1"
524
541
}
525
542
}
526
543
544
+ Mock ImportModuleManifest {
545
+ [PSCustomObject ]@ {
546
+ Name = " MyModule"
547
+ ModuleBase = " TestDrive:/MyModule/"
548
+ }
549
+ }
550
+
527
551
$global :Mock_OutputPath = Convert-FolderSeparator " TestDrive:/MyModule/$ExpectedVersion "
528
552
529
553
Mock Get-ChildItem {
0 commit comments