5 Responses

  1. How to Version and Publish a PowerShell Module to GitHub and PSGallery with AppVeyor - How to Code .NET

    […] on April 17, 2017 submitted by /u/Net-Runner [link] [comments] Leave a […]

  2. markwragg
    markwragg at |

    This has been really useful in improving my CI pipeline, thanks for writing it. I’ve borrowed bits of yours and worked them into the PSDeploy method by PSCookieMonster.

    One issue I have just discovered is that if your are publishing a module with just a single function, your code can end up mangling the manifest as the [-1] takes the last character from the function name rather than the last function name. I fixed this behaviour by adding the unary operator to this line, forcing it to always be an array, as follows:

    $FunctionList = (,(Get-ChildItem -Path .\$Env:BHProjectName\Public).BaseName)

    1. markwragg
      markwragg at |

      Actually just discovered this solution breaks the functionality when there are multiple functions, so needs rethinking.

  3. markwragg
    markwragg at |

    This works for both scenarios:

    $FunctionList = @((Get-ChildItem -Path .\$Env:BHProjectName\Public).BaseName)

  4. How do you deal with Module version when using Github/Appveyor/PSGallery ? - How to Code .NET

    […] Do you update let Appveyor increment the version number and reach Github back (from appveyor) example […]

Share your point of view!