You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: project.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"ProjectName": "ModuleTools",
3
3
"Description": "ModuleTools is a versatile, standalone PowerShell module builder. Create anything from simple to robust modules with ease. Built for CICD and Automation.",
Copy file name to clipboardExpand all lines: src/public/UpdateModVersion.ps1
+22-14Lines changed: 22 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,17 @@
1
1
<#
2
2
.SYNOPSIS
3
-
Updates the version number of a module in project.json file.
3
+
Updates the version number of a module in project.json file. Uses [semver] object type.
4
4
5
5
.DESCRIPTION
6
-
This script updates the version number of a PowerShell module by modifying the project.json file, which gets written into module manifest file (.psd1).
7
-
It increments the version number based on the specified version part (Major, Minor, Patch).
6
+
This script updates the version number of a PowerShell module by modifying the project.json file, which gets written into module manifest file (.psd1). [semver] is supported only powershell 7 and above.
7
+
It increments the version number based on the specified version part (Major, Minor, Patch). Can also attach preview/stable release to Release property of
8
8
9
9
.PARAMETERLabel
10
10
The part of the version number to increment (Major, Minor, Patch). Default is patch.
11
11
12
+
.PARAMETERPreviewRelease
13
+
Use this to use semantic version and attach release name as 'preview' which is supported by PowerShell gallery, to remove it use stable release parameter
14
+
12
15
.EXAMPLE
13
16
Update-MTModuleVersion -Label Major
14
17
Updates the Major version part of the module. Version 2.1.3 will become 3.1.3
@@ -24,28 +27,33 @@ function Update-MTModuleVersion {
0 commit comments