Common DomBros build scripts based on PSDepend, PSake and AppVeyor
- Create a repository with single Powershell module (YourModuleName) and following structure:
Build <-- submodule (see point 2)
YourModuleName
YourModuleName.psd1
YourModuleName.psm1
...
Tests <-- optional, put your Pester tests here
- Add a git submodule in folder
Build
pointing toDomBrosBuildTools
repository (https://github.com/DomBros/DomBrosBuildTools.git
). - Create a new AppVeyor project pointing to your repository and change following settings:
- Build version format -> change it from
1.0.0.{build}
to{build}
- Custom configuration .yml file name -> put
https://raw.githubusercontent.com/DomBros/DomBrosBuildTools/master/appveyor.yml
- Build version format -> change it from
- That's it, every commit to your repository will trigger a build that packages your module and runs tests and static code analysis. When you create a tag, it will also be published to Powershell Gallery (with version = tag name).
- Remember to check
Include tags
during push (after tagging) and 'Recursive' during first pull.
If you have any issues, look at a working example at DomBrosTools repository.