Skip to content

Commit 559cc41

Browse files
authored
Help files (#13)
* renamed and linked * move to subfolder * added cab file * updated xml manually * it works now * markdown updated * module md updated * add license, update cab * switch to master branch
1 parent 9438c8b commit 559cc41

14 files changed

+186
-323
lines changed

Docs/Get-GitModule.md

+39-7
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,45 @@ Get-GitModule [-ProjectUri] <String[]> [-Branch <String>] [-KeepTempCopy] [<Comm
2222
This cmdlet will check for existence of PowerShell module in given repository and return its version.
2323
You can also specify desired git branch.
2424

25-
Cmdlet requires `git` tool to work.
26-
It will download (`git clone`) specified repository to temporary repository and analyze it.
25+
Cmdlet requires `git` client tool to work. It will download (`git clone`) specified repository to temporary directory and analyze it.
2726
By default, it will delete this temporary copy, but if needed, it can be kept.
2827

28+
Cmdlet searches for module manifest (*.psd1) file only. Modules with only *.psm1 files are not supported at the moment.
29+
2930
## EXAMPLES
3031

3132
### 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+
3248
```powershell
33-
PS C:\> {{ Add example code here }}
49+
PS C:\> $M = Find-Module FIFA2018; $M.Version; ($M | Get-GitModule).Version
50+
51+
0.2.45
52+
0.3.46
3453
```
3554

36-
{{ Add example description here }}
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.
3757

3858
## PARAMETERS
3959

4060
### -Branch
41-
{{Fill Branch Description}}
61+
62+
Optional parameter that specifies which branch should be cloned.
63+
If omitted, `master` branch will be used.
4264

4365
```yaml
4466
Type: String
@@ -53,7 +75,12 @@ Accept wildcard characters: False
5375
```
5476
5577
### -KeepTempCopy
56-
{{Fill KeepTempCopy Description}}
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.
5784

5885
```yaml
5986
Type: SwitchParameter
@@ -68,7 +95,12 @@ Accept wildcard characters: False
6895
```
6996

7097
### -ProjectUri
71-
{{Fill ProjectUri Description}}
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.
72104

73105
```yaml
74106
Type: String[]

Docs/Install-GitModule.md

+35-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ schema: 2.0.0
88
# Install-GitModule
99

1010
## SYNOPSIS
11-
{{Fill in the Synopsis}}
11+
12+
This cmdlet installs PowerShell module specified by its git repository URL to user's default install directory.
1213

1314
## SYNTAX
1415

@@ -18,21 +19,37 @@ Install-GitModule [-ProjectUri] <String[]> [[-Branch] <String>] [[-DestinationPa
1819
```
1920

2021
## DESCRIPTION
21-
{{Fill in the Description}}
22+
23+
This cmdlet installs PowerShell module specified by its git repository URL to user's default install folder.
24+
25+
You can also specify desired git branch.
26+
27+
Cmdlet internally uses `Get-GitModule` cmdlet, so it requires `git` client tool to work.
28+
Cmdlet will actually download specified repository to user's default install directory for PowerShell modules.
29+
30+
It does not support functionality `-Scope AllUsers`, but it is possible to specify `-DestinationPath` argument which will provide the same result.
31+
32+
Cmdlet searches for module manifest (*.psd1) file only. Modules with only *.psm1 files are not supported at the moment.
33+
34+
Note that this will not import module, only install it (the same as built-in cmdlet `Install-Module`).
35+
You can rely on PowerShell's automatic import of modules into user session when needed.
2236

2337
## EXAMPLES
2438

2539
### Example 1
40+
2641
```powershell
27-
PS C:\> {{ Add example code here }}
42+
PS C:\> Install-GitModule 'https://github.com/iricigor/psaptgetupdate' -Verbose
2843
```
2944

30-
{{ Add example description here }}
45+
This cmdlet will install PowerShell module from [given repository](https://github.com/iricigor/psaptgetupdate').
3146

3247
## PARAMETERS
3348

3449
### -Branch
35-
{{Fill Branch Description}}
50+
51+
Optional parameter that specifies which branch should be cloned.
52+
If omitted, `master` branch will be used.
3653

3754
```yaml
3855
Type: String
@@ -47,7 +64,9 @@ Accept wildcard characters: False
4764
```
4865
4966
### -DestinationPath
50-
{{Fill DestinationPath Description}}
67+
68+
If you have a specific setup, you can override default install location with this parameter.
69+
As cmdlet always installs to user specific location, this can be useful to perform system wide installation (requires also elevated prompt).
5170
5271
```yaml
5372
Type: String
@@ -62,7 +81,9 @@ Accept wildcard characters: False
6281
```
6382
6483
### -Force
65-
{{Fill Force Description}}
84+
85+
If the module with specified name and the version exists, installation will fail.
86+
You can override this behaviour with `-Force` switch.
6687

6788
```yaml
6889
Type: SwitchParameter
@@ -77,7 +98,13 @@ Accept wildcard characters: False
7798
```
7899

79100
### -ProjectUri
80-
{{Fill ProjectUri Description}}
101+
102+
Mandatory parameter specifying URL or the repository. Multiple values are supported.
103+
Parameter is passed to `git` client, so whatever works there is good value.
104+
For example, in GitHub URLs you can specify parameter both with or without `.git` at the end of URL.
105+
106+
You can pass this parameter also via pipeline, for example via `Find-Module` built-in cmdlet.
107+
81108

82109
```yaml
83110
Type: String[]

0 commit comments

Comments
 (0)