Skip to content

Commit a67fad6

Browse files
authored
!deploy v0.3.0 release (#17)
## 0.3.0 - 2019-09-07 * [Issue #15](#15) * Added `Add-PSProfileToProfile` function to easily add `Import-Module PSProfile` to your PowerShell profile. * [Issue #16](#16) * Added the following functions from the `PSProfile.PowerTools` plugin to PSProfile directly: * `Confirm-ScriptIsValid` * `Enter-CleanEnvironment` * `Format-Syntax` * `Get-Definition` * `Get-Gist` * `Get-LongPath` * `Install-LatestModule` * `Open-Code` * `Open-Item` * `Pop-Path` * `Push-Path` * `Start-BuildScript` * `Test-RegEx` * Added HelpFile for Power Tools functions: `Get-Help about_PSProfile_Power_Tools` * Updated `Start-PSProfileConfigurationHelper` with Power Tools section * Miscellaneous * Cleaned up `PSProfile` class. * Updated alias list. * Updated module versioning strategy in build script. * Updated `GitAliases` plugin to only spawn 1 runspace in the background. * Fixed issue with `Copy-Parameters` where it would fail to pull parameters for commands with multiple parameter sets. * Updated Content.Tests. * Updated azure-pipelines YAML. * Renamed the InvokeBuild script from `tasks.build.ps1` to `invoke.build.ps1`.
2 parents 72efe9e + 6d81469 commit a67fad6

28 files changed

+1389
-1138
lines changed

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
* [PSProfile - ChangeLog](#psprofile---changelog)
2+
* [0.3.0 - 2019-09-07](#030---2019-09-07)
23
* [0.2.0 - 2019-09-02](#020---2019-09-02)
34
* [0.1.9 - 2019-08-26](#019---2019-08-26)
45
* [0.1.8 - 2019-08-26](#018---2019-08-26)
@@ -15,6 +16,37 @@
1516

1617
# PSProfile - ChangeLog
1718

19+
## 0.3.0 - 2019-09-07
20+
21+
* [Issue #15](https://github.com/scrthq/PSProfile/issues/15)
22+
* Added `Add-PSProfileToProfile` function to easily add `Import-Module PSProfile` to your PowerShell profile.
23+
* [Issue #16](https://github.com/scrthq/PSProfile/issues/16)
24+
* Added the following functions from the `PSProfile.PowerTools` plugin to PSProfile directly:
25+
* `Confirm-ScriptIsValid`
26+
* `Enter-CleanEnvironment`
27+
* `Format-Syntax`
28+
* `Get-Definition`
29+
* `Get-Gist`
30+
* `Get-LongPath`
31+
* `Install-LatestModule`
32+
* `Open-Code`
33+
* `Open-Item`
34+
* `Pop-Path`
35+
* `Push-Path`
36+
* `Start-BuildScript`
37+
* `Test-RegEx`
38+
* Added HelpFile for Power Tools functions: `Get-Help about_PSProfile_Power_Tools`
39+
* Updated `Start-PSProfileConfigurationHelper` with Power Tools section
40+
* Miscellaneous
41+
* Cleaned up `PSProfile` class.
42+
* Updated alias list.
43+
* Updated module versioning strategy in build script.
44+
* Updated `GitAliases` plugin to only spawn 1 runspace in the background.
45+
* Fixed issue with `Copy-Parameters` where it would fail to pull parameters for commands with multiple parameter sets.
46+
* Updated Content.Tests.
47+
* Updated azure-pipelines YAML.
48+
* Renamed the InvokeBuild script from `tasks.build.ps1` to `invoke.build.ps1`.
49+
1850
## 0.2.0 - 2019-09-02
1951

2052
* [Issue #2](https://github.com/scrthq/PSProfile/issues/2)

PSProfile/Classes/PSProfile.Classes.ps1

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,11 @@ if ($env:AWS_PROFILE) {
245245
$plugPaths += $_
246246
}
247247
$this.PluginPaths = $plugPaths | Select-Object -Unique
248-
if (-not ($this.Plugins | Where-Object { $_.Name -eq 'PSProfile.PowerTools' })) {
249-
$plugs = @(@{Name = 'PSProfile.PowerTools' })
250-
$this.Plugins | ForEach-Object {
251-
$plugs += $_
252-
}
248+
$plugs = @()
249+
$this.Plugins | Where-Object { $_.Name -ne 'PSProfile.PowerTools' } | ForEach-Object {
250+
$plugs += $_
251+
}
252+
if ($plugs.Count) {
253253
$this.Plugins = $plugs
254254
}
255255
if (([datetime]::Now - $this.LastRefresh) -gt [timespan]$this.RefreshFrequency) {
@@ -854,6 +854,7 @@ if ($env:AWS_PROFILE) {
854854
)
855855
if ($this.Plugins.Count) {
856856
$this.Plugins.ForEach( {
857+
if ($_.Name -ne 'PSProfile.PowerTools') {
857858
$plugin = $_
858859
$this._log(
859860
"'$($plugin.Name)' Searching for plugin",
@@ -909,7 +910,7 @@ if ($env:AWS_PROFILE) {
909910
}
910911
else {
911912
$this._log(
912-
"'$($plugin.Name)' plugin not found!",
913+
"'$($plugin.Name)' plugin not found! To remove this plugin from your profile, run 'Remove-PSProfilePlugin $($plugin.Name)'",
913914
'LoadPlugins',
914915
'Warning'
915916
)
@@ -919,7 +920,8 @@ if ($env:AWS_PROFILE) {
919920
catch {
920921
throw
921922
}
922-
})
923+
}
924+
})
923925
}
924926
else {
925927
$this._log(

PSProfile/PSProfile.Aliases.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,12 @@
99
'Switch-Prompt' = 'Switch-PSProfilePrompt'
1010
'Remove-Prompt' = 'Remove-PSProfilePrompt'
1111
'Copy-DynamicParameters' = 'Copy-Parameters'
12+
'def' = 'Get-Definition'
13+
'open' = 'Open-Item'
14+
'push' = 'Push-Path'
15+
'pop' = 'Pop-Path'
16+
'cln' = 'Enter-CleanEnvironment'
17+
'bld' = 'Start-BuildScript'
18+
'syntax' = 'Format-Syntax'
19+
'path' = 'Get-LongPath'
1220
}

PSProfile/PSProfile.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'PSProfile.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.2.0'
15+
ModuleVersion = '0.3.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = @('Desktop','Core')

PSProfile/Plugins/PSProfile.GitAliases.ps1

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,21 @@ function Update-GitAliases {
1212
[hashtable]
1313
$AliasHash
1414
)
15-
$null = $AliasHash.GetEnumerator() | Start-RSJob -Name {"_PSProfile_GitAliases_" + $_.Key} -ScriptBlock {
16-
Write-Output "Updating git alias '$($_.Key)' with value '$($_.Value)'"
17-
$i = 0
18-
$passed = $false
19-
do {
20-
$i++
21-
try {
22-
Invoke-Expression $("git config --global alias.{0} `"{1}`"" -f $_.Key,$_.Value)
23-
$passed = $true
15+
$null = Start-RSJob -Name {"_PSProfile_GitAliases"} -ArgumentList $AliasHash -ScriptBlock {
16+
Param ([hashtable]$hash)
17+
$hash.GetEnumerator() | ForEach-Object {
18+
$i = 0
19+
$passed = $false
20+
do {
21+
$i++
22+
try {
23+
Invoke-Expression $("git config --global alias.{0} `"{1}`"" -f $_.Key,$_.Value)
24+
$passed = $true
25+
}
26+
catch {}
2427
}
25-
catch {}
28+
until ($i -ge 5 -or $passed)
2629
}
27-
until ($i -ge 5 -or $passed)
2830
}
2931
}
3032
Export-ModuleMember -Function 'Update-GitAliases'

0 commit comments

Comments
 (0)