Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c0d0c57

Browse files
author
Robin Stolpe
committed
Change order
Fixes #30
1 parent be83c85 commit c0d0c57

3 files changed

Lines changed: 21 additions & 21 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
$GetAllInstalledVersions = Get-InstalledModule -Name $m -AllVersions | Sort-Object { $_.Version -as [version] } -Descending | Select-Object -ExpandProperty Version
7070

7171
# If the module has more then one version loop trough the versions and only keep the most current one
72-
if ($GetAllInstalledVersions.Count -gt 1) {
72+
if ($GetAllInstalledVersions.Count -gt 0) {
7373
$MostRecentVersion = $null
7474
[version]$MostRecentVersion = $GetAllInstalledVersions[0]
7575
Foreach ($Version in $GetAllInstalledVersions | Where-Object { [version]$_ -lt [version]$MostRecentVersion }) {

MaintainModule/MaintainModule.psd1

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

3333
@{
3434

3535
# Script module or binary module file associated with this manifest.
36-
RootModule = '.\MaintainModule.psm1'
36+
RootModule = '.\MaintainModule.psm1'
3737

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

4141
# Supported PSEditions
4242
# CompatiblePSEditions = @()
4343

4444
# ID used to uniquely identify this module
45-
GUID = '4fec1769-909e-44cf-b715-bbc6b10564b3'
45+
GUID = '4fec1769-909e-44cf-b715-bbc6b10564b3'
4646

4747
# Author of this module
48-
Author = 'Robin Stolpe'
48+
Author = 'Robin Stolpe'
4949

5050
# Company or vendor of this module
51-
CompanyName = 'Stolpe.io'
51+
CompanyName = 'Stolpe.io'
5252

5353
# Copyright statement for this module
54-
Copyright = '(c) 2023 Robin Stolpe. All rights reserved.'
54+
Copyright = '(c) 2023 Robin Stolpe. All rights reserved.'
5555

5656
# Description of the functionality provided by this module
57-
Description = 'This module let you maintain/update your installed PowerShell modules in a easy way'
57+
Description = 'This module let you maintain/update your installed PowerShell modules in a easy way'
5858

5959
# Minimum version of the PowerShell engine required by this module
60-
PowerShellVersion = '5.1'
60+
PowerShellVersion = '5.1'
6161

6262
# Name of the PowerShell host required by this module
6363
# PowerShellHostName = ''
@@ -93,16 +93,16 @@
9393
# NestedModules = @()
9494

9595
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
96-
FunctionsToExport = "Uninstall-RSModule", "Update-RSModule"
96+
FunctionsToExport = "Uninstall-RSModule", "Update-RSModule"
9797

9898
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
99-
CmdletsToExport = @()
99+
CmdletsToExport = @()
100100

101101
# Variables to export from this module
102-
VariablesToExport = '*'
102+
VariablesToExport = '*'
103103

104104
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
105-
AliasesToExport = @()
105+
AliasesToExport = @()
106106

107107
# DSC resources to export from this module
108108
# DscResourcesToExport = @()
@@ -114,27 +114,27 @@
114114
# FileList = @()
115115

116116
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
117-
PrivateData = @{
117+
PrivateData = @{
118118

119119
PSData = @{
120120

121121
# Tags applied to this module. These help with module discovery in online galleries.
122-
Tags = @("PowerShell", "macOS", "Windows", "Linux", "support-tool", "sysadmin-tool", "it-tool", "maintain-module", "module-maintenance", "multi-platform", "multiOS")
122+
Tags = @("PowerShell", "macOS", "Windows", "Linux", "support-tool", "sysadmin-tool", "it-tool", "maintain-module", "module-maintenance", "multi-platform", "multiOS")
123123

124124
# A URL to the license for this module.
125-
LicenseUri = 'https://github.com/rstolpe/MaintainModule/blob/main/LICENSE'
125+
LicenseUri = 'https://github.com/rstolpe/MaintainModule/blob/main/LICENSE'
126126

127127
# A URL to the main website for this project.
128-
ProjectUri = 'https://github.com/rstolpe/MaintainModule'
128+
ProjectUri = 'https://github.com/rstolpe/MaintainModule'
129129

130130
# A URL to an icon representing this module.
131131
# IconUri = ''
132132

133133
# ReleaseNotes of this module
134-
ReleaseNotes = 'https://github.com/rstolpe/MaintainModule/releases'
134+
ReleaseNotes = 'https://github.com/rstolpe/MaintainModule/releases'
135135

136136
# Prerelease string of this module
137-
Prerelease = ''
137+
Prerelease = ''
138138

139139
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
140140
RequireLicenseAcceptance = $false

MaintainModule/MaintainModule.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Function Uninstall-RSModule {
9292
$GetAllInstalledVersions = Get-InstalledModule -Name $m -AllVersions | Sort-Object { $_.Version -as [version] } -Descending | Select-Object -ExpandProperty Version
9393

9494
# If the module has more then one version loop trough the versions and only keep the most current one
95-
if ($GetAllInstalledVersions.Count -gt 1) {
95+
if ($GetAllInstalledVersions.Count -gt 0) {
9696
$MostRecentVersion = $null
9797
[version]$MostRecentVersion = $GetAllInstalledVersions[0]
9898
Foreach ($Version in $GetAllInstalledVersions | Where-Object { [version]$_ -lt [version]$MostRecentVersion }) {

0 commit comments

Comments
 (0)