Updates to Publish-Module require the source folder to be the same as the module name
Closed this issue · 1 comments
jberkers42 commented
Expected Behavior
When performing the Invoke-Build -Task Publish
, assuming all requirements are met, the module should be published to PSGallery.
Actual Behavior
When performing the Invoke-Build -Task Publish
all tasks complete, except the publish itself, returning an error:
No valid module was found at the specified location
Steps to Reproduce the Problem
- Create an otherwise valid PowerShell Module that passes all tests and compiles
- Perform
Invoke-Build -Task Publish
- The error is returned
One of the current requirements for Publish-Module is that the Folder/Directory specified in the -Path parameter have the same name as the module itself. In the Module Build script the folder name is build.
Specifications
- Version: Plaster 1.0.x
- Platform: PowerShell Core
- Subsystem: Invoke-Build
Solution
Adjust the Build script to create a sub-folder under build using the module name, derived in the same way as in other parts of the script.
I will submit a PR for the same.