Skip to content

Commit edbdb60

Browse files
author
Robin Stolpe
authored
Merge pull request #26 from rstolpe/dev
Changed output to verbose to make the script cleaner to run.
2 parents 21941c8 + e3fa7e8 commit edbdb60

10 files changed

+15
-10
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@
2626
.Trashes
2727
ehthumbs.db
2828
Thumbs.db
29+
RSModuleBuilder.ps1
30+
MaintainModule.psd1.source
2931

3032
*.csproj.user
3133

3234
bin/
3335
obj/
3436
.vs/
3537
.vscode/
36-
.idea/
38+
.idea/
39+
license/

.src/Public/Function/Uninstall-RSModule.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,5 @@
9090
Write-Verbose "$($m) don't have any older versions installed then $($GetAllInstalledVersions), no need to uninstall anything."
9191
}
9292
}
93-
Write-Output "`n---/// Script Finished! ///---"
93+
Write-Output "`n=== \\\ Script Finished! /// ===`n"
9494
}

.src/Public/Function/Update-RSModule.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
[version]$LatestInstalledVersion = $($GetAllInstalledVersions | Select-Object Version -First 1).version
136136

137137
# Collects the latest version of module from the source where the module was installed from
138-
Write-Output "Looking up the latest version of $($m)..."
138+
Write-Verbose "Looking up the latest version of $($m)..."
139139
[version]$CollectLatestVersion = $(Find-Module -Name $m -AllVersions | Sort-Object { $_.Version -as [version] } -Descending | Select-Object Version -First 1).version
140140

141141
# Looking if the version of the module are the latest version, it it's not the latest it will install the latest version.
@@ -155,6 +155,7 @@
155155
# If switch -UninstallOldVersion has been used then the old versions will be uninstalled from the module
156156
if ($UninstallOldVersion -eq $true) {
157157
if ($GetAllInstalledVersions.Count -gt 1) {
158+
Write-Output "Uninstalling old versions $($LatestInstalledVersion) of $($m)..."
158159
Uninstall-RSModule -Module $m
159160
}
160161
}
@@ -206,5 +207,5 @@
206207
}
207208
}
208209
}
209-
Write-Output "`n---/// Script Finished! ///---"
210+
Write-Output "`n=== \\\ Script Finished! /// ===`n"
210211
}

MaintainModule/MaintainModule.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#
2828
# Generated by: Robin Stolpe
2929
#
30-
# Generated on: 2023-01-18
30+
# Generated on: 2023-01-19
3131
#
3232

3333
@{
@@ -36,7 +36,7 @@
3636
RootModule = '.\MaintainModule.psm1'
3737

3838
# Version number of this module.
39-
ModuleVersion = '0.1.4'
39+
ModuleVersion = '0.1.5'
4040

4141
# Supported PSEditions
4242
# CompatiblePSEditions = @()

MaintainModule/MaintainModule.psm1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Function Uninstall-RSModule {
113113
Write-Verbose "$($m) don't have any older versions installed then $($GetAllInstalledVersions), no need to uninstall anything."
114114
}
115115
}
116-
Write-Output "`n---/// Script Finished! ///---"
116+
Write-Output "`n=== \\\ Script Finished! /// ===`n"
117117
}
118118
Function Update-RSModule {
119119
<#
@@ -252,7 +252,7 @@ Function Update-RSModule {
252252
[version]$LatestInstalledVersion = $($GetAllInstalledVersions | Select-Object Version -First 1).version
253253

254254
# Collects the latest version of module from the source where the module was installed from
255-
Write-Output "Looking up the latest version of $($m)..."
255+
Write-Verbose "Looking up the latest version of $($m)..."
256256
[version]$CollectLatestVersion = $(Find-Module -Name $m -AllVersions | Sort-Object { $_.Version -as [version] } -Descending | Select-Object Version -First 1).version
257257

258258
# Looking if the version of the module are the latest version, it it's not the latest it will install the latest version.
@@ -272,6 +272,7 @@ Function Update-RSModule {
272272
# If switch -UninstallOldVersion has been used then the old versions will be uninstalled from the module
273273
if ($UninstallOldVersion -eq $true) {
274274
if ($GetAllInstalledVersions.Count -gt 1) {
275+
Write-Output "Uninstalling old versions $($LatestInstalledVersion) of $($m)..."
275276
Uninstall-RSModule -Module $m
276277
}
277278
}
@@ -323,5 +324,5 @@ Function Update-RSModule {
323324
}
324325
}
325326
}
326-
Write-Output "`n---/// Script Finished! ///---"
327+
Write-Output "`n=== \\\ Script Finished! /// ===`n"
327328
}

RSModuleBuilder.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[string]$apiKey = ""
1010
#
1111
# Changes on every build
12-
[string]$Version = "0.1.4"
12+
[string]$Version = "0.1.5"
1313
[string]$PowerShellVersion = "5.1"
1414
[string]$Tags = '"PowerShell", "macOS", "Windows", "Linux", "support-tool", "sysadmin-tool", "it-tool", "maintain-module", "module-maintenance", "multi-platform", "multiOS"'
1515
[string]$ProcessorArchitecture = ""
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)