Skip to content

Commit

Permalink
Tidy up tests, build, 2018.
Browse files Browse the repository at this point in the history
  • Loading branch information
nightroman committed Jan 1, 2018
1 parent 75ee612 commit c212106
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
7 changes: 3 additions & 4 deletions .build.ps1
Expand Up @@ -35,11 +35,11 @@ function Get-Version {
}

# Synopsis: Generate or update meta files.
task Meta -Inputs Release-Notes.md -Outputs Module\$ModuleName.psd1, Src\AssemblyInfo.cs {
task Meta -Inputs Release-Notes.md, .build.ps1 -Outputs Module\$ModuleName.psd1, Src\AssemblyInfo.cs {
$Version = Get-Version
$Project = 'https://github.com/nightroman/SplitPipeline'
$Summary = 'SplitPipeline - Parallel Data Processing in PowerShell'
$Copyright = 'Copyright (c) 2011-2016 Roman Kuzmin'
$Copyright = 'Copyright (c) 2011-2018 Roman Kuzmin'

Set-Content Module\$ModuleName.psd1 @"
@{
Expand Down Expand Up @@ -96,8 +96,7 @@ task Build Meta, {
task PostBuild {
exec { robocopy Module $ModuleRoot /s /np /r:0 /xf *-Help.ps1 } (0..3)
Copy-Item Src\Bin\$Configuration\$ModuleName.dll $ModuleRoot
},
(job Help -Safe)
}, ?Help

# Synopsis: Remove temp and info files.
task Clean {
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
@@ -1,6 +1,6 @@

SplitPipeline - Parallel Data Processing in PowerShell
Copyright (c) 2011-2016 Roman Kuzmin
Copyright (c) 2011-2018 Roman Kuzmin

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
3 changes: 1 addition & 2 deletions Module/en-US/about_SplitPipeline.help.txt
@@ -1,5 +1,4 @@

TOPIC
TOPIC
about_SplitPipeline

SHORT DESCRIPTION
Expand Down
2 changes: 1 addition & 1 deletion Src/Job.cs
@@ -1,5 +1,5 @@

// Copyright (c) 2011-2016 Roman Kuzmin
// Copyright (c) Roman Kuzmin
// http://www.apache.org/licenses/LICENSE-2.0

using System;
Expand Down
2 changes: 1 addition & 1 deletion Src/SplitPipelineCommand.cs
@@ -1,5 +1,5 @@

// Copyright (c) 2011-2016 Roman Kuzmin
// Copyright (c) Roman Kuzmin
// http://www.apache.org/licenses/LICENSE-2.0

using System;
Expand Down
5 changes: 4 additions & 1 deletion Tests/Assorted.test.ps1
Expand Up @@ -10,7 +10,10 @@
Import-Module SplitPipeline
Set-StrictMode -Version Latest

task ApartmentState {
$Version = $PSVersionTable.PSVersion.Major
$IsCore = $Version -eq 6 -and $PSVersionTable.PSEdition -eq 'Core'

task ApartmentState -If (!$IsCore) {
# default
assert ("MTA" -eq (1 | Split-Pipeline { [System.Threading.Thread]::CurrentThread.ApartmentState }))
# MTA
Expand Down
5 changes: 4 additions & 1 deletion Tests/Scripts.test.ps1
Expand Up @@ -10,6 +10,9 @@
Import-Module SplitPipeline
Set-StrictMode -Version Latest

$Version = $PSVersionTable.PSVersion.Major
$IsCore = $Version -eq 6 -and $PSVersionTable.PSEdition -eq 'Core'

task Finally1 {
$1 = ''
try {
Expand All @@ -31,7 +34,7 @@ task Finally2 {
assert ($result.Count -eq 2) $result.Count
}

task BeginProcessEnd {
task BeginProcessEnd -If (!$IsCore) {
$DebugPreference = 'Continue'
$result = 1..4 | Split-Pipeline -Count 2 -Load 1 -Verbose `
-Begin {
Expand Down

0 comments on commit c212106

Please sign in to comment.