Skip to content
Open
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
5 changes: 5 additions & 0 deletions test/Shared.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
$modulePath = Convert-Path $PSScriptRoot\..\src
# Test against built folder in CI (or just set $env:CI locally for that)
if ($env:CI) {
Copy link
Copy Markdown
Collaborator

@rkeithhill rkeithhill Sep 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works on a build machine. Can we also add a PowerShell variable check here like:

if ($env:CI -or $PoshGitBuild)

That way if we build & test from the build.ps1 script on a dev machine, it will run the Pester tests against the release dir. And because that $PoshGitBuild variable goes away after the build script exits, I can still run tests from the src folder module when I doing dev work.

$moduleVersion = (Import-LocalizedData -FileName 'posh-git.psd1' -BaseDirectory ($modulePath)).ModuleVersion
$modulePath = Convert-Path $PSScriptRoot\..\$moduleVersion
}
$moduleManifestPath = "$modulePath\posh-git.psd1"

$csi = [char]0x1b + "["
Expand Down