|
1 | 1 | # PSSemVer |
2 | 2 |
|
3 | | -This module introduces a SemVer 2.0.0 compatible class for PowerShell. |
4 | | - |
5 | | -## Prerequisites |
6 | | - |
7 | | -No prerequisites. |
| 3 | +PSSemVer is a PowerShell module that adds a SemVer-compatible class and helper functions. |
8 | 4 |
|
9 | 5 | ## Installation |
10 | 6 |
|
11 | | -To install the module and class run the following command: |
| 7 | +Install the module from the PowerShell Gallery: |
12 | 8 |
|
13 | 9 | ```powershell |
14 | | -Install-Module -Name PSSemVer |
| 10 | +Install-PSResource -Name PSSemVer |
15 | 11 | Import-Module -Name PSSemVer |
16 | 12 | ``` |
17 | 13 |
|
18 | | -## Usage |
19 | | - |
20 | | -Here is a list of example that are typical use cases for the module. |
21 | | -This section should provide a good overview of the module's capabilities. |
22 | | - |
23 | | -### Create a new SemVer object |
24 | | - |
25 | | -```powershell |
26 | | -$Version = New-PSSemVer -Version 1.0.0 |
27 | | -``` |
28 | | - |
29 | | -### Create a new SemVer object with prerelease and build metadata |
30 | | - |
31 | | -```powershell |
32 | | -$Version = New-PSSemVer -Version 1.0.0 -PreRelease 'alpha' -Build '2020-01-01' |
33 | | -``` |
34 | | - |
35 | | -### Create a new SemVer object from a string |
36 | | - |
37 | | -```powershell |
38 | | -$Version = New-PSSemVer -Version '1.0.0-alpha+2020-01-01' |
39 | | -``` |
40 | | - |
41 | | -### Compare two SemVer objects |
42 | | - |
43 | | -```powershell |
44 | | -$Version1 = New-PSSemVer -Version 1.0.0 |
45 | | -$Version2 = New-PSSemVer -Version 1.0.1 |
46 | | -$Version1 -lt $Version2 |
47 | | ->_ true |
48 | | -``` |
49 | | - |
50 | | -### Increment the major version |
51 | | - |
52 | | -```powershell |
53 | | -$Version = New-PSSemVer -Version 1.0.0 |
54 | | -$Version.BumpMajor() |
55 | | -``` |
56 | | - |
57 | | -### Increment the minor version |
58 | | - |
59 | | -```powershell |
60 | | -$Version = New-PSSemVer -Version 1.0.0 |
61 | | -$Version.BumpMinor() |
62 | | -``` |
63 | | - |
64 | | -### Increment the patch version |
| 14 | +## Documentation |
65 | 15 |
|
66 | | -```powershell |
67 | | -$Version = New-PSSemVer -Version 1.0.0 |
68 | | -$Version.BumpPatch() |
69 | | -``` |
| 16 | +Documentation is published at [psmodule.io/PSSemVer](https://psmodule.io/PSSemVer/). |
70 | 17 |
|
71 | | -### Set the prerelease |
| 18 | +Use PowerShell help and command discovery for module details: |
72 | 19 |
|
73 | 20 | ```powershell |
74 | | -$Version = New-PSSemVer -Version 1.0.0 |
75 | | -$Version.SetPreRelease('alpha') |
| 21 | +Get-Command -Module PSSemVer |
| 22 | +Get-Help <CommandName> -Examples |
76 | 23 | ``` |
77 | 24 |
|
78 | 25 | ## Contributing |
79 | 26 |
|
80 | | -Coder or not, you can contribute to the project! We welcome all contributions. |
81 | | - |
82 | | -### For Users |
83 | | - |
84 | | -If you don't code, you still sit on valuable information that can make this project even better. If you experience that the |
85 | | -product does unexpected things, throw errors or is missing functionality, you can help by submitting bugs and feature requests. |
86 | | -Please see the issues tab on this project and submit a new issue that matches your needs. |
87 | | - |
88 | | -### For Developers |
89 | | - |
90 | | -If you do code, we'd love to have your contributions. Please read the [Contribution guidelines](CONTRIBUTING.md) for more information. |
91 | | -You can either help by picking up an existing issue or submit a new one if you have an idea for a new feature or improvement. |
92 | | - |
93 | | -## Links |
94 | | - |
95 | | -- [Semantic Versioning 2.0.0](https://semver.org/) |
| 27 | +Issues and pull requests are welcome. Please use the repository issue tracker to report bugs, request features, or discuss improvements. |
0 commit comments