Skip to content

Commit ef08120

Browse files
Merge pull request #20 from fabrisodotps1/develop
V0.8.0
2 parents 518415b + 22eaccf commit ef08120

5 files changed

+302
-27
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ignore the Release directory
2+
Release/

Deployment.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
## Script Analyzer
2+
3+
```pwsh
4+
Install-PSResource -Name PSScriptAnalyzer
5+
Invoke-ScriptAnalyzer -Path C:\GIT_WorkingDir\M365PSProfile\M365PSProfile.psm1 -ExcludeRule PSAvoidUsingWriteHost
6+
```
7+
8+
## Testing
9+
10+
```pwsh
11+
Import-Module C:\Git_WorkingDir\M365PSProfile\M365PSProfile.psd1
12+
Get-Command -Module M365PSProfile
13+
Get-M365StandardModule
14+
Uninstall-M365Module
15+
Install-M365Module
16+
Add-M365PSProfile
17+
Disconnect-All
18+
Set-WindowTitle -Title "M365PSProfile"
19+
```
20+
21+
## Pull Request to Main
22+
23+
Create a Pull Request to Main and Approve
24+
25+
## Add GIT Tag
26+
27+
Adding Tags in git
28+
29+
```pwsh
30+
# List Tags
31+
git tag
32+
33+
# Add Tag
34+
git tag -a v0.8.0 -m "Release v0.8.0"
35+
36+
# Push Tag to Repo
37+
git push origin --tags
38+
```
39+
40+
## Create Release
41+
42+
Create Release from GitHub Portal based on Tag
43+
44+
## Deploy to Release Folder
45+
46+
```pwsh
47+
cd C:\GIT_WorkingDir\M365PSProfile\
48+
49+
$CurrentDirectory = (Get-Location).Path
50+
$Path = (Get-Location).Path + "\Release"
51+
52+
#Delete Folder Release if it exist
53+
If (Test-Path -Path $Path)
54+
{
55+
Remove-Item -Path $Path -Recurse -confirm:$false
56+
}
57+
58+
#Create Folder Release
59+
New-Item -Path $Path -Type "Directory"
60+
61+
# Copy PoweShell Files to Release Folder
62+
$PSFiles = Get-ChildItem -Path $CurrentDirectory -File | Where-Object {$_.Name -match ".psd1" -or $_.Name -match ".psm1"}
63+
Copy-Item $PSFiles -Destination $Path
64+
```
65+
66+
## Deploy to PowerShell Gallery
67+
68+
Deploy Files from the Release Directory to the PowerShell Gallery
69+
70+
```pwsh
71+
cd C:\GIT_WorkingDir\M365PSProfile\
72+
73+
$Path = (Get-Location).Path + "\Release\"
74+
$APIKey = "YourSecretApiKey"
75+
Publish-PSResource -Path $Path -ApiKey $APIKey -Repository PSGallery
76+
```

M365PSProfile.psd1

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
RootModule = 'M365PSProfile.psm1'
99

1010
# Version number of this module.
11-
ModuleVersion = '0.7.0'
11+
ModuleVersion = '0.8.0'
1212

1313
# Supported PSEditions
1414
CompatiblePSEditions = @('Core', 'Desktop')
@@ -49,7 +49,7 @@ PowerShellVersion = '5.1'
4949

5050
# Modules that must be imported into the global environment prior to importing this module
5151
# RequiredModules = @()
52-
RequiredModules = @(@{ModuleName = 'Microsoft.PowerShell.PSResourceGet'; GUID = 'e4e0bda1-0703-44a5-b70d-8fe704cd0643'; ModuleVersion = '1.0.5'; })
52+
RequiredModules = @(@{ModuleName = 'Microsoft.PowerShell.PSResourceGet'; GUID = 'e4e0bda1-0703-44a5-b70d-8fe704cd0643'; ModuleVersion = '1.0.6'; })
5353

5454
# Assemblies that must be loaded prior to importing this module
5555
# RequiredAssemblies = @()
@@ -111,11 +111,11 @@ PrivateData = @{
111111
ReleaseNotes = '
112112
---------------------------------------------------------------------------------------------
113113
Whats new in this release:
114-
V0.7.0
115-
- Added Version to the Install-M365Module Function
116-
- Added optional Parameter -Repository (default PSGallery) if using multiple Repositorys by @diecknet
117-
- The Function Add-M365PSProfile now adds the needed commands to the $Profile by @diecknet and @bohrenan
118-
- Changed from "Press any key to continue..." to a Counter from 5 to 1 when other PS Processes are running
114+
V0.8.0
115+
- Bugfix: Removed unnecessary variable $InstalledModuleVersion in "module is not installed" area
116+
- Added Parameter -FileMode to uninstall Modules using the Filesystem
117+
- Bumped Requirement for Microsoft.PowerShell.PSResourceGet to 1.0.6
118+
- Improved the Disconnect-All Function
119119
---------------------------------------------------------------------------------------------
120120
'
121121
} # End of PSData hashtable

0 commit comments

Comments
 (0)