Skip to content

Commit 6fb9714

Browse files
committed
Fix update module function
1 parent 1cecb08 commit 6fb9714

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

project.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"ProjectName": "ModuleTools",
33
"Description": "ModuleTools is a versatile, standalone PowerShell module builder. Create anything from simple to robust modules with ease. Built for CICD and Automation.",
4-
"Version": "1.2.0",
4+
"Version": "1.2.1",
55
"copyResourcesToModuleRoot": false,
66
"Manifest": {
77
"Author": "Manjunath Beli",
@@ -19,4 +19,4 @@
1919
"Verbosity": "Detailed"
2020
}
2121
}
22-
}
22+
}

src/public/UpdateModVersion.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,17 @@ function Update-MTModuleVersion {
3737
$jsonContent = Get-Content -Path $data.ProjecJSON | ConvertFrom-Json
3838

3939
[semver]$CurrentVersion = $jsonContent.Version
40+
$Major = $CurrentVersion.Major
41+
$Minor = $CurrentVersion.Minor
4042

4143
if ($Label -eq 'Major') {
4244
$Major = $CurrentVersion.Major + 1
4345
$Minor = 0
4446
$Patch = 0
4547
} elseif ($Label -eq 'Minor') {
46-
$Major = $CurrentVersion.Major
4748
$Minor = $CurrentVersion.Minor + 1
4849
$Patch = 0
4950
} elseif ($Label -eq 'Patch') {
50-
$Major = $CurrentVersion.Major
51-
$Minor = $CurrentVersion.Minor
5251
$Patch = $CurrentVersion.Patch + 1
5352
}
5453

0 commit comments

Comments
 (0)