Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build module #698

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
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
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