-
Notifications
You must be signed in to change notification settings - Fork 92
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
Added -PassThru Parameter for Compress-PSResource #1702
Merged
alerickson
merged 2 commits into
PowerShell:master
from
jshigetomi:AddPassThruForCompress
Sep 13, 2024
Merged
Added -PassThru Parameter for Compress-PSResource #1702
alerickson
merged 2 commits into
PowerShell:master
from
jshigetomi:AddPassThruForCompress
Sep 13, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Looks good, but |
/azp PowerShell.PSResourceGet |
Command 'PowerShell.PSResourceGet' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
/azp run PowerShell.PSResourceGet |
Azure Pipelines successfully started running 1 pipeline(s). |
Nevermind! Sorry, was thinking of |
alerickson
reviewed
Sep 12, 2024
/azp run PowerShell.PSResourceGet |
Azure Pipelines successfully started running 1 pipeline(s). |
alerickson
approved these changes
Sep 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary
This pull request introduces a new
PassThru
parameter to theCompressPSResource
cmdlet, enabling the full path of the generated.nupkg
file to be returned through the pipeline. Additionally, it includes updates to thePublishHelper
class to support this new functionality and adds a test case to verify thePassThru
parameter's behavior.New Feature Addition:
src/code/CompressPSResource.cs
: Added thePassThru
parameter to theCompressPSResource
cmdlet, allowing the full path of the.nupkg
file to be passed through the pipeline. [1] [2]Internal Code Updates:
src/code/PublishHelper.cs
: Updated thePublishHelper
class to handle the newPassThru
parameter, including changes to the constructor and thePackNupkg
method to write the.nupkg
file path to the pipeline ifPassThru
is specified. [1] [2]Testing:
test/PublishPSResourceTests/CompressPSResource.Tests.ps1
: Added a new test case to ensure that theCompress-PSResource
cmdlet with the-PassThru
parameter correctly returns the path to the.nupkg
file.PR Context
-PassThru parameter was included in the mockup of the Compress-PSResource cmdlet but was not included in the previous PR.
This PR aims to fix that. -PassThru would be very useful for scripting Compress with Publish where the variable can be sent directly to Publish's -NupkgPath.
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.