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
# This will update the modules PowerCLI and ImportExcel and delete all of the old versions that are installed of PowerCLI and ImportExcel and then import the modules.
[Parameter(Mandatory=$false,HelpMessage="Specify modules that you want to update, if this is empty all of the modules that are installed on the system will get updated")]
157
+
[Parameter(Mandatory=$false,HelpMessage="Enter module or modules (separated with ,) that you want to update, if you don't enter any all of the modules will be updated")]
152
158
[string]$Module,
153
-
[ValidateSet("CurrentUser","AllUsers",$null)]
154
-
[Parameter(Mandatory=$true,HelpMessage="Choose either AllUsers or CurrentUser depending on which layer you want to update/Install/uninstall the module on")]
159
+
[ValidateSet("CurrentUser","AllUsers")]
160
+
[Parameter(Mandatory=$true,HelpMessage="Enter CurrentUser or AllUsers depending on what scope you want to change your modules")]
155
161
[string]$Scope="CurrentUser",
156
-
[Parameter(Mandatory=$false,HelpMessage="Imports all of the modules that are specified in the Module parameter in the end of the script")]
162
+
[Parameter(Mandatory=$false,HelpMessage="Import modules that has been entered in the module parameter at the end of this function")]
157
163
[switch]$ImportModule=$false,
158
164
[Parameter(Mandatory=$false,HelpMessage="Uninstalls all old versions of the modules")]
159
165
[switch]$UninstallOldVersion=$false,
160
-
[Parameter(Mandatory=$false,HelpMessage="When using this switch all modules that are specified in the Module parameter and are not installed will be installed")]
166
+
[Parameter(Mandatory=$false,HelpMessage="Install all of the modules that has been entered in module that are not installed on the system")]
161
167
[switch]$InstallMissing=$false
162
168
)
163
169
@@ -230,33 +236,7 @@ Function Update-RSModule {
230
236
231
237
# If switch -UninstallOldVersion has been used then the old versions will be uninstalled from the module
232
238
if ($UninstallOldVersion-eq$true) {
233
-
# Collecting all of the installed versions of the module, this is needed to run again as we might have been installed a new version above.
234
-
Write-Verbose"Collecting all installed version of $($m)..."
[Parameter(Mandatory=$false,HelpMessage="Use this switch if you want to publish to PSGallery after the module has been prepared")]
2
+
# Set this to true before releasing the module
3
+
[Parameter(Mandatory=$false,HelpMessage="Enter the version number of this release")]
4
+
[string]$Version="0.0.8",
5
+
# Fix this
6
+
[Parameter(Mandatory=$false,HelpMessage=".")]
7
+
[string]$preRelease,
8
+
[Parameter(Mandatory=$false,HelpMessage="Use this switch to publish this module on PSGallery")]
5
9
[bool]$Publish=$false,
6
-
[Parameter(Mandatory=$false,HelpMessage="Write your API key for PSGallery")]
10
+
# Validate so if $Publish is true this is needed
11
+
[Parameter(Mandatory=$false,HelpMessage="Enter API key for PSGallery")]
7
12
[string]$apiKey
8
13
)
9
14
10
-
$Version="0.0.7"
11
-
#$preReleaseTag = "-beta"
12
-
$Year= (Get-Date).Year
13
-
$ManifestDate=Get-Date-Format "yyyy-MM-dd"
15
+
# When module creates this file add what version this file comes from for the EasyModuleBuild
16
+
# Check if it's any newer version of this module, if it's any newer alert the user about it.
17
+
# Create script to generate GUID and populate it in the manifest when generated, this should only happen in the setup new module script not in this one.
18
+
# Create script will also populate the Company, PreReleaseTag, author and webpageURI for the manifest.
19
+
20
+
# Need to find a way to handle -beta tags, might add a switch for that
21
+
$preReleaseTag="beta"
14
22
15
23
# Creating ArrayList for use later in the script
16
24
[System.Collections.ArrayList]$FunctionPSD=@()
17
25
18
-
# Name of the module
26
+
$Year= (Get-Date).Year
27
+
$ManifestDate=Get-Date-Format "yyyy-MM-dd"
28
+
29
+
# Gets the folder name from the folder where this script are located
# Check if the user has any settingfiles for this module if not, then Copy .psd1.source and FileLicens.ps1.source to this folder from the this modules root folder
# check so all the nessacary files are there, if not check if user has user settingsfiles for this module if he don't have it copy the original files from the root module folder
46
90
}
47
91
48
-
# Adding the text from the filelicens.ps1 to the .psm1 file for licensing of GNU v3
0 commit comments