Closed DanGough closed 3 years ago
Next release will be 2105.100 to see if it alleviates this.
I think this is resolved now.
When publishing the module, empty folders are removed. The Private folder was empty, and a non-existent Private folder was throwing an error during the init of import-module. Adding -ErrorAction Ignore
to the line that scans for functions there seems to have sorted it!
For some reason, most likely a bug in Powershell, if you add this Requires statement to your code:
It fails with:
ResourceUnavailable: The script 'AutoPackager.ps1' cannot be run because the following modules that are specified by the "#requires" statements of the script are missing: Nevergreen.
Yet it works if you retry!
I suspect this might be down to the version format used. I have copied the version format used by Evergreen, i.e. YYMM.Build, except my first release was 2105.001. However when I published the module it was coming up as 2105.1. Seeing that it stripped the preceeding zeroes, I just called the next release 2105.2 in the module manifest.
Visiting the Powershell Gallery at https://www.powershellgallery.com/packages/Nevergreen though redirects to 2105.1 instead of the latest version, which is odd, and the reason why I suspect the version being a cause.