Install Module from Git
This PowerShell module will help you to easily instal PowerShell modules directly from Azure DevOps (aka VSTS) or GitHub or any other git repository.
All you need to know is a URL of the git repository and the module will take care of everything else.
The module is compatible both with Linux and Windows versions of PowerShell (Windows PowerShell 5 or PowerShell Core 6).
Prerequisites
Get-Command git
in your PowerShell.
Installation
From PowerShell gallery
This is recommended way how to install module.
Install-Module InstallModuleFromGit -Scope CurrentUser
Clone GitHub repository
git clone https://github.com/iricigor/InstallModuleFromGit
Import-Module ./InstallModuleFromGit/InstallModuleFromGit.psd1
Using this module
If you have this module already installed, you can install latest / not-yet-published version from this GitHUb repository using the module itself! As all commits are verified before and after they are merged to master branch, this should be pretty safe operation also.
Install-GitModule https://github.com/iricigor/InstallModuleFromGit
Examples
# Check for module existence and its version
PS:\> Get-GitModule 'https://github.com/iricigor/FIFA2018' -Verbose
# Download and import module in one line
PS:\> (Install-GitModule 'https://github.com/iricigor/psaptgetupdate').Name | Import-Module
Commands
Module
The module Install Module From Git exposes two new commandlets. More info on module here.
Get-GitModule
Checks for module existence and returns its version. More info here.
Install-GitModule
Installs PowerShell module to user's default install folder. More info here.
Update-GitModule
Updates previously installed PowerShell module if Git repository contains newer version. More info here.
Commands Help System
Module provides updatable help system, though it is working currently only on Windows PowerShell. Tracking issue is here.
Update-Help -Module InstallModuleFromGit -Force
Tests
Click on images to see details about the latest build runs.
Similar PowerShell modules
📣 dfinke/InstallModuleFromGitHub, (pluses) does not require git client, (minuses) works only with GitHub
Support
You can chat about this commandlet via Skype (no Skype ID required), by clicking a link below.
Contributing
If you find any problems, feel free to open a new issue.
If you want to contribute, please fork the code and make a new PR after!