|
1 |
| ---- |
2 |
| -external help file: InstallGitModule-help.xml |
3 |
| -Module Name: InstallGitModule |
4 |
| -online version: |
5 |
| -schema: 2.0.0 |
6 |
| ---- |
7 |
| - |
8 |
| -# Get-GitModule |
9 |
| - |
10 |
| -## SYNOPSIS |
11 |
| - |
12 |
| -This cmdlet will check for existence of PowerShell module in given repository and return its version. |
13 |
| - |
14 |
| -## SYNTAX |
15 |
| - |
16 |
| -``` |
17 |
| -Get-GitModule [-ProjectUri] <String[]> [-Branch <String>] [-KeepTempCopy] [<CommonParameters>] |
18 |
| -``` |
19 |
| - |
20 |
| -## DESCRIPTION |
21 |
| - |
22 |
| -This cmdlet will check for existence of PowerShell module in given repository and return its version. |
23 |
| -You can also specify desired git branch. |
24 |
| - |
25 |
| -Cmdlet requires `git` client tool to work. It will download (`git clone`) specified repository to temporary directory and analyze it. |
26 |
| -By default, it will delete this temporary copy, but if needed, it can be kept. |
27 |
| - |
28 |
| -Cmdlet searches for module manifest (*.psd1) file only. Modules with only *.psm1 files are not supported at the moment. |
29 |
| - |
30 |
| -## EXAMPLES |
31 |
| - |
32 |
| -### Example 1 |
33 |
| - |
34 |
| -```powershell |
35 |
| -PS C:\> Get-GitModule 'https://github.com/iricigor/FIFA2018' -Verbose |
36 |
| -
|
37 |
| -Name : FIFA2018 |
38 |
| -Version : 0.3.46 |
39 |
| -Path : |
40 |
| -Root : True |
41 |
| -Git : https://github.com/iricigor/FIFA2018 |
42 |
| -``` |
43 |
| - |
44 |
| -This cmdlet will check for existence of PowerShell module in [given repository](https://github.com/iricigor/FIFA2018') and return its version _(currently 0.3.46)_. |
45 |
| - |
46 |
| -### Example 2 |
47 |
| - |
48 |
| -```powershell |
49 |
| -PS C:\> $M = Find-Module FIFA2018; $M.Version; ($M | Get-GitModule).Version |
50 |
| -
|
51 |
| -0.2.45 |
52 |
| -0.3.46 |
53 |
| -``` |
54 |
| - |
55 |
| -This illustrates how you can check latest versions of the module both in PSGallery and in its repository. |
56 |
| -Notice that cmdlet `Get-GitModule` accepts value for `-ProjectURI` via pipeline. |
57 |
| - |
58 |
| -## PARAMETERS |
59 |
| - |
60 |
| -### -Branch |
61 |
| - |
62 |
| -Optional parameter that specifies which branch should be cloned. |
63 |
| -If omitted, `master` branch will be used. |
64 |
| - |
65 |
| -```yaml |
66 |
| -Type: String |
67 |
| -Parameter Sets: (All) |
68 |
| -Aliases: |
69 |
| - |
70 |
| -Required: False |
71 |
| -Position: Named |
72 |
| -Default value: None |
73 |
| -Accept pipeline input: False |
74 |
| -Accept wildcard characters: False |
75 |
| -``` |
76 |
| -
|
77 |
| -### -KeepTempCopy |
78 |
| -
|
79 |
| -Cmdlet will download (`git clone`) specified repository to temporary directory and analyze it. |
80 |
| -By default, it will delete this temporary copy. If needed use this switch parameter to keep this temporary copy. |
81 |
| -You can check `Path` attribute of return value to see exact path where temporary copy is located. |
82 |
| - |
83 |
| -This is used for example in `Install-GitModule` to directly install module from this temporary copy. |
84 |
| - |
85 |
| -```yaml |
86 |
| -Type: SwitchParameter |
87 |
| -Parameter Sets: (All) |
88 |
| -Aliases: |
89 |
| -
|
90 |
| -Required: False |
91 |
| -Position: Named |
92 |
| -Default value: None |
93 |
| -Accept pipeline input: False |
94 |
| -Accept wildcard characters: False |
95 |
| -``` |
96 |
| - |
97 |
| -### -ProjectUri |
98 |
| - |
99 |
| -Mandatory parameter specifying URL or the repository. Multiple values are supported. |
100 |
| -Parameter is passed to `git` client, so whatever works there is good value. |
101 |
| -For example, in GitHub URLs you can specify parameter both with or without `.git` at the end of URL. |
102 |
| - |
103 |
| -You can pass this parameter also via pipeline, for example via `Find-Module` built-in cmdlet. |
104 |
| - |
105 |
| -```yaml |
106 |
| -Type: String[] |
107 |
| -Parameter Sets: (All) |
108 |
| -Aliases: |
109 |
| -
|
110 |
| -Required: True |
111 |
| -Position: 0 |
112 |
| -Default value: None |
113 |
| -Accept pipeline input: True (ByPropertyName) |
114 |
| -Accept wildcard characters: False |
115 |
| -``` |
116 |
| - |
117 |
| -### CommonParameters |
118 |
| -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). |
119 |
| - |
120 |
| -## INPUTS |
121 |
| - |
122 |
| -### System.String[] |
123 |
| - |
124 |
| -## OUTPUTS |
125 |
| - |
126 |
| -### System.Object |
127 |
| -## NOTES |
128 |
| - |
129 |
| -## RELATED LINKS |
| 1 | +--- |
| 2 | +external help file: InstallModuleFromGit-help.xml |
| 3 | +Module Name: InstallModuleFromGit |
| 4 | +online version: |
| 5 | +schema: 2.0.0 |
| 6 | +--- |
| 7 | + |
| 8 | +# Get-GitModule |
| 9 | + |
| 10 | +## SYNOPSIS |
| 11 | +This cmdlet will check for existence of PowerShell module in given repository and return its version. |
| 12 | + |
| 13 | +## SYNTAX |
| 14 | + |
| 15 | +``` |
| 16 | +Get-GitModule [-ProjectUri] <String[]> [-Branch <String>] [-KeepTempCopy] [<CommonParameters>] |
| 17 | +``` |
| 18 | + |
| 19 | +## DESCRIPTION |
| 20 | +This cmdlet will check for existence of PowerShell module in given repository and return its version. |
| 21 | +You can also specify desired git branch. |
| 22 | + |
| 23 | +Cmdlet requires \`git\` client tool to work. |
| 24 | +It will download (\`git clone\`) specified repository to temporary directory and analyze it. |
| 25 | +By default, it will delete this temporary copy, but if needed, it can be kept. |
| 26 | + |
| 27 | +Cmdlet searches for module manifest ( .psd1) file only. |
| 28 | +Modules with only .psm1 files are not supported at the moment. |
| 29 | + |
| 30 | +## EXAMPLES |
| 31 | + |
| 32 | +### Example 1 |
| 33 | +``` |
| 34 | +PS C:\> Get-GitModule 'https://github.com/iricigor/FIFA2018' -Verbose |
| 35 | +
|
| 36 | +Name : FIFA2018 |
| 37 | +Version : 0.3.46 |
| 38 | +Path : |
| 39 | +Root : True |
| 40 | +Git : https://github.com/iricigor/FIFA2018 |
| 41 | +``` |
| 42 | + |
| 43 | +This cmdlet will check for existence of PowerShell module in given repository (https://github.com/iricigor/FIFA2018') and return its version (currently 0.3.46) . |
| 44 | + |
| 45 | +### Example 2 |
| 46 | +``` |
| 47 | +PS C:\> $M = Find-Module FIFA2018; $M.Version; ($M | Get-GitModule).Version |
| 48 | +
|
| 49 | +0.2.45 |
| 50 | +0.3.46 |
| 51 | +``` |
| 52 | + |
| 53 | +This illustrates how you can check latest versions of the module both in PSGallery and in its repository. |
| 54 | +Notice that cmdlet \`Get-GitModule\` accepts value for \`-ProjectURI\` via pipeline. |
| 55 | + |
| 56 | +## PARAMETERS |
| 57 | + |
| 58 | +### -Branch |
| 59 | +Optional parameter that specifies which branch should be cloned. |
| 60 | +If omitted, \`master\` branch will be used. |
| 61 | + |
| 62 | +```yaml |
| 63 | +Type: String |
| 64 | +Parameter Sets: (All) |
| 65 | +Aliases: |
| 66 | + |
| 67 | +Required: False |
| 68 | +Position: Named |
| 69 | +Default value: None |
| 70 | +Accept pipeline input: False |
| 71 | +Accept wildcard characters: False |
| 72 | +``` |
| 73 | +
|
| 74 | +### -KeepTempCopy |
| 75 | +Cmdlet will download (\`git clone\`) specified repository to temporary directory and analyze it. |
| 76 | +By default, it will delete this temporary copy. |
| 77 | +If needed use this switch parameter to keep this temporary copy. |
| 78 | +You can check \`Path\` attribute of return value to see exact path where temporary copy is located. |
| 79 | +
|
| 80 | +This is used for example in \`Install-GitModule\` to directly install module from this temporary copy. |
| 81 | +
|
| 82 | +```yaml |
| 83 | +Type: SwitchParameter |
| 84 | +Parameter Sets: (All) |
| 85 | +Aliases: |
| 86 | + |
| 87 | +Required: False |
| 88 | +Position: Named |
| 89 | +Default value: False |
| 90 | +Accept pipeline input: False |
| 91 | +Accept wildcard characters: False |
| 92 | +``` |
| 93 | +
|
| 94 | +### -ProjectUri |
| 95 | +Mandatory parameter specifying URL or the repository. |
| 96 | +Multiple values are supported. |
| 97 | +Parameter is passed to \`git\` client, so whatever works there is good value. |
| 98 | +For example, in GitHub URLs you can specify parameter both with or without \`.git\` at the end of URL. |
| 99 | +
|
| 100 | +You can pass this parameter also via pipeline, for example via \`Find-Module\` built-in cmdlet. |
| 101 | +
|
| 102 | +```yaml |
| 103 | +Type: String[] |
| 104 | +Parameter Sets: (All) |
| 105 | +Aliases: |
| 106 | + |
| 107 | +Required: True |
| 108 | +Position: 0 |
| 109 | +Default value: None |
| 110 | +Accept pipeline input: True (ByPropertyName) |
| 111 | +Accept wildcard characters: False |
| 112 | +``` |
| 113 | +
|
| 114 | +### CommonParameters |
| 115 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). |
| 116 | +
|
| 117 | +## INPUTS |
| 118 | +
|
| 119 | +### System.String[] |
| 120 | +## OUTPUTS |
| 121 | +
|
| 122 | +### System.Object |
| 123 | +## NOTES |
| 124 | +
|
| 125 | +## RELATED LINKS |
0 commit comments