Skip to content

Commit efd3efe

Browse files
author
Robin Stolpe
committed
updated with some info
1 parent 4b8d80d commit efd3efe

13 files changed

Lines changed: 28 additions & 58 deletions

.src/MaintainModule.psd1.source

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<#
22
MIT License
33

4-
Copyright (C) {{year}} {{author}}.
5-
{{mail}}
6-
<{{website}}>
4+
Copyright (C) {{year}} {{author}}.
75

86
Permission is hereby granted, free of charge, to any person obtaining a copy
97
of this software and associated documentation files (the "Software"), to deal
@@ -44,7 +42,7 @@
4442
# CompatiblePSEditions = @()
4543

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

4947
# Author of this module
5048
Author = '{{author}}'
@@ -121,7 +119,7 @@
121119
PSData = @{
122120

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

126124
# A URL to the license for this module.
127125
LicenseUri = '{{licenseuri}}'

.src/license/LICENSE.source

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
MIT License
33

44
Copyright (C) {{year}} {{author}}.
5-
{{mail}}
6-
<{{website}}>
75

86
Permission is hereby granted, free of charge, to any person obtaining a copy
97
of this software and associated documentation files (the "Software"), to deal

LICENSE

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
MIT License
22

33
Copyright (C) 2023 Robin Stolpe.
4-
robin@stolpe.io
5-
<https://stolpe.io>
64

75
Permission is hereby granted, free of charge, to any person obtaining a copy
86
of this software and associated documentation files (the "Software"), to deal

MaintainModule/MaintainModule.psd1

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<#
22
MIT License
33
4-
Copyright (C) 2023 Robin Stolpe.
5-
robin@stolpe.io
6-
<https://stolpe.io>
4+
Copyright (C) 2023 Robin Stolpe.
75
86
Permission is hereby granted, free of charge, to any person obtaining a copy
97
of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +27,7 @@
2927
#
3028
# Generated by: Robin Stolpe
3129
#
32-
# Generated on: 2023-01-17
30+
# Generated on: 2023-01-18
3331
#
3432

3533
@{
@@ -38,13 +36,13 @@
3836
RootModule = '.\MaintainModule.psm1'
3937

4038
# Version number of this module.
41-
ModuleVersion = '0.1.2'
39+
ModuleVersion = '0.1.3'
4240

4341
# Supported PSEditions
4442
# CompatiblePSEditions = @()
4543

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

4947
# Author of this module
5048
Author = 'Robin Stolpe'
@@ -56,7 +54,7 @@
5654
Copyright = '(c) 2023 Robin Stolpe. All rights reserved.'
5755

5856
# Description of the functionality provided by this module
59-
Description = 'This module will help you to update your software on your Windows 10 and Windows 11 machines.'
57+
Description = 'This module let you maintain/update your installed PowerShell modules in a easy way'
6058

6159
# Minimum version of the PowerShell engine required by this module
6260
PowerShellVersion = '5.1'
@@ -95,7 +93,7 @@
9593
# NestedModules = @()
9694

9795
# 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.
98-
FunctionsToExport = "Uninstall-RSModule", "Update-RSModule"
96+
FunctionsToExport = "Uninstall-RSModule", "Update-RSModule"
9997

10098
# 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.
10199
CmdletsToExport = @()
@@ -121,7 +119,7 @@
121119
PSData = @{
122120

123121
# Tags applied to this module. These help with module discovery in online galleries.
124-
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")
125123

126124
# A URL to the license for this module.
127125
LicenseUri = 'https://github.com/rstolpe/MaintainModule/blob/main/LICENSE'
@@ -136,7 +134,7 @@
136134
ReleaseNotes = 'https://github.com/rstolpe/MaintainModule/releases'
137135

138136
# Prerelease string of this module
139-
Prerelease = 'Alpha'
137+
Prerelease = ''
140138

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

MaintainModule/MaintainModule.psm1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<#
22
MIT License
33
4-
Copyright (C) 2023 Robin Stolpe.
5-
robin@stolpe.io
6-
<https://stolpe.io>
4+
Copyright (C) 2023 Robin Stolpe.
75
86
Permission is hereby granted, free of charge, to any person obtaining a copy
97
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
![GitHub](https://img.shields.io/github/license/rstolpe/MaintainModule?style=plastic) ![GitHub last commit](https://img.shields.io/github/last-commit/rstolpe/MaintainModule?style=plastic) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/rstolpe/maintainmodule?sort=semver&style=plastic)
1+
![GitHub](https://img.shields.io/github/license/rstolpe/MaintainModule?style=plastic)
2+
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/rstolpe/MaintainModule?sort=semver&style=plastic) ![Last release](https://img.shields.io/github/release-date/rstolpe/MaintainModule?style=plastic)
3+
![GitHub last commit](https://img.shields.io/github/last-commit/rstolpe/MaintainModule?style=plastic)
4+
![PSGallery downloads](https://img.shields.io/powershellgallery/dt/MaintainModule?style=plastic)
25

36
# MaintainModule
47
This module let you update all of your installed modules and also uninstall the old versions to keep things clean.
@@ -15,6 +18,7 @@ I have added the result from PSScriptAnalyzer in [test folder](https://github.co
1518
- Import specified modules in the end of the script
1619

1720
# Links
21+
* [My PowerShell Collection](https://github.com/rstolpe/PSCollection)
1822
* [Webpage/Blog](https://www.stolpe.io)
1923
* [Twitter](https://twitter.com/rstolpes)
2024
* [LinkedIn](https://www.linkedin.com/in/rstolpe/)

RSModuleBuilder.ps1

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@
44
[string]$Author = "Robin Stolpe"
55
[string]$Mail = "robin@stolpe.io"
66
[string]$Website = "https://stolpe.io"
7-
[string]$preRelease = "Alpha"
7+
[string]$preRelease = ""
88
[string]$Company = "Stolpe.io"
99
[string]$apiKey = ""
1010
#
1111
# Changes on every build
12-
[string]$Version = "0.1.2"
12+
[string]$Version = "0.1.3"
1313
[string]$PowerShellVersion = "5.1"
14+
[string]$Tags = '"PowerShell", "macOS", "Windows", "Linux", "support-tool", "sysadmin-tool", "it-tool", "maintain-module", "module-maintenance", "multi-platform", "multiOS"'
1415
[string]$ProcessorArchitecture = ""
1516
[string]$LicenseUrl = "https://github.com/rstolpe/MaintainModule/blob/main/LICENSE"
1617
[string]$ProjectUrl = "https://github.com/rstolpe/MaintainModule"
1718
[string]$ReleaseNotesUrl = "https://github.com/rstolpe/MaintainModule/releases"
18-
[string]$Description = "This module will help you to update your software on your Windows 10 and Windows 11 machines."
19+
[string]$Description = "This module let you maintain/update your installed PowerShell modules in a easy way"
1920
[bool]$Publish = $false
2021

2122
# Creating ArrayList for use later in the script
@@ -65,7 +66,7 @@ foreach ($function in $MigrateFunction.FullName) {
6566

6667
# Converting the function name to fit the .psd1 file for exporting
6768
$function = $function -split "/" -replace ".ps1" | Select-Object -Last 1
68-
$function = """$($function)"", "
69+
$function = """$($function)"","
6970
[void]($function.trim())
7071

7172
# Collect the name of all .ps1 files so it can be added as functions in the psd1 file.
@@ -78,7 +79,7 @@ if ($null -ne $MigrateFunction) {
7879
# Bug! If the module only contain one function the , after the name are not removed, need to remove that
7980
$FunctionPSD = $FunctionPSD | ForEach-Object {
8081
if ( $FunctionPSD.IndexOf($_) -eq ($FunctionPSD.count - 1) ) {
81-
$_.replace(", ", "")
82+
$_.replace(",", "")
8283
}
8384
else {
8485
$_
@@ -125,6 +126,7 @@ $PSDfileContent = $PSDfileContent -replace '{{projecturi}}', $ProjectUrl
125126
$PSDfileContent = $PSDfileContent -replace '{{description}}', $Description
126127
$PSDfileContent = $PSDfileContent -replace '{{powershellversion}}', $PowerShellVersion
127128
$PSDfileContent = $PSDfileContent -replace '{{processorarchitecture}}}', $ProcessorArchitecture
129+
$PSDfileContent = $PSDfileContent -replace '{{tags}}', $Tags
128130

129131
# If $FunctionPSD are empty, then adding @() instead according to best practices for performance
130132
if ($null -ne $FunctionPSD) {
@@ -141,7 +143,7 @@ Write-Output "Running PSScriptAnalyzer on $($MigrateFunction.name)..."
141143
$ResultPS1 = foreach ($ps1 in $MigrateFunction.FullName) {
142144
$ps1Name = $ps1 -split "/" -replace ".ps1" | Select-Object -Last 1
143145
Write-Verbose "Running PSScriptAnalyzer on $($ps1Name).ps1..."
144-
$PSAnalyzerPS1 = Invoke-ScriptAnalyzer -Path $ps1 -ReportSummary
146+
$PSAnalyzerPS1 = Invoke-ScriptAnalyzer -Path $ps1 -ReportSummary -Fix
145147
if ($null -ne $PSAnalyzerPS1) {
146148
$PSAnalyzerPS1 | select-object * | Out-File -Encoding UTF8BOM -FilePath $(Join-Path -Path $TestPath -ChildPath "PSScriptAnalyzer_$($ps1Name)_$($TodaysDate).md")
147149
}
@@ -156,7 +158,7 @@ $CheckPSA = @($outPSDFile, $outPSMFile)
156158
$ResultPSDPSM = foreach ($file in $CheckPSA) {
157159
$psdPSMName = $file -split "/" | Select-Object -Last 1
158160
Write-Verbose "Running PSScriptAnalyzer on $($psdPSMName)..."
159-
$PSAnalyzer = Invoke-ScriptAnalyzer -Path $file -ReportSummary
161+
$PSAnalyzer = Invoke-ScriptAnalyzer -Path $file -ReportSummary -Fix
160162
if ($null -ne $PSAnalyzer) {
161163
$PSAnalyzer | select-object * | Out-File -Encoding UTF8BOM -FilePath $(Join-Path -Path $TestPath -ChildPath "PSScriptAnalyzer_$($psdPSMName)_$($TodaysDate).md")
162164
}

test/PSScriptAnalyzer_MaintainModule.psd1_2023-01-17.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

test/PSScriptAnalyzer_Uninstall-RSModule_2023-01-17.md renamed to test/PSScriptAnalyzer_MaintainModule.psd1_2023-01-18.md

File renamed without changes.

test/PSScriptAnalyzer_MaintainModule.psm1_2023-01-17.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)