X Tutup
The Wayback Machine - https://web.archive.org/web/20200918094904/https://github.com/PowerShell/PSScriptAnalyzer/pull/1247
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

Change build script to install into a versioned directory #1247

Merged
merged 7 commits into from Jun 3, 2019

Conversation

@JamesWTruher
Copy link
Member

JamesWTruher commented May 31, 2019

instead of installing into out/PSScriptAnalyzer it will be out/PSScriptAnalyzer/
I also added some -force to a number of the New-item -type directory tests because they cause misleading screen output because the directory already existed.
I fixed one of the tests which was not setting �$env:PSModulePath back correctly to its original state.

PR Summary

A number of infrastructure and test fixes

PR Checklist

instead of installing into out/PSScriptAnalyzer it will be out/PSScriptAnalyzer/<version>
Also add some -force to a number of the
ew-item -type directory tests because they cause misleading screen output
tracked down one of the tests which was not setting �nv:PSModulePath back correctly
Versioned module directories are not supported, so we need to change the name of the directory from <version> to PSScriptAnalyzer so it can be added to env:PSModulePath and work as expected
@JamesWTruher JamesWTruher force-pushed the JamesWTruher:VersionBuild branch from 9167a5b to cbb59cf Jun 2, 2019
@JamesWTruher JamesWTruher requested a review from bergmeister Jun 3, 2019
$oldPSModulePath = $env:PSModulePath
$savedPSModulePath = $env:PSModulePath
}
AfterAll {

This comment has been minimized.

@bergmeister

bergmeister Jun 3, 2019 Collaborator

Just a note, there is a Pester issue here whereby using BeforeAll or AfterAll inside a Context block results in unpredictable behaviour. Technically they should be only under a Describe block. We should address this in another PR as refactoring this test suite is hard.

This comment has been minimized.

@JamesWTruher

JamesWTruher Jun 3, 2019 Author Member

yah - I agree - the missing AfterAll was the reason that the analyzer needed to be installed into a specific location. with this change, that is no longer needed! The test altered $env:PSModulePath permanently!

Copy link
Collaborator

bergmeister left a comment

Looks good to me, I ran the build and tests locally (Windows) on PS 6.2 and 5.1 and it worked fine.

@JamesWTruher JamesWTruher merged commit 6c946c0 into PowerShell:development Jun 3, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla All CLA requirements met.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.
X Tutup