Version numbers are managed by GitVersion. When building locally, the version number generated by Build.ps1
. When building in GitHub Actions, the version number is set using the latest tag.
To build locally:
.\Build.ps1 -Verbose -SkipScriptAnalyzer -Version 1.4.1
-Verbose
-duh-SkipScriptAnalyzer
- Skips ScriptAnalyzer. This is useful when you are developing and don't want to wait for ScriptAnalyzer to run.-Version
- Sets the version number. If not specified, the version number is generated by GitVersion.
Build.ps1
will create the ./Output/F7History
folder containing the module, build the module, publish it to a local repository (-Repository -local
), and import it into the current PowerShell session. To create the local repository, run this command:
Register-PSRepository -Name local -SourceLocation "~/psrepo" -InstallationPolicy Trusted
To test:
.\test.ps1
The Build.ps1
script will use the latest version of ConsoleGuiTools
from the PowerShell Gallery by default. To build and test with a specific version of ConsoleGuiTools
publish it to the local repository first (you have to setup a local repository first):
# In the ConsoleGuiTools folder...
Publish-Module -Path .\ConsoleGuiTools -Repository local
If Build.ps1
finds a local repository it will use it instead of the PowerShell Gallery.
The module is published to the PowerShell Gallery using GitHub Actions. See the publish.yml GitHub Action for details.
- Merge changes to the
main
branch, or push directly tomain
. The GitHub Action will build the module, but not publish it. - Add and push a new tag using
Deploy.ps1
:
# Don't use -Version to let GitVersion generate the version number (last tag + patch increment)
./Deploy.ps1
# Specify the version number to override default behavior of using GitVersion to generate the version number.
./Deploy.ps1 -Version 1.4.2
This will build, test, and publish to the PowerShell Gallery here: https://www.powershellgallery.com/packages/F7History
Thanks goes to these wonderful people (emoji key):
Tig 🚧 🚇 👀 |
This project follows the all-contributors specification. Contributions of any kind welcome!