Skip to content

Commit

Permalink
Merge pull request #80 from smoonlee/3.1.16.1-dev
Browse files Browse the repository at this point in the history
Executing Release Build
  • Loading branch information
smoonlee authored Aug 8, 2024
2 parents 14947de + caae0d1 commit 19d5605
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Microsoft.PowerShell_profile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ Version: 3.1.14.4 - July 2024 | Updated Update-PSProfile, Changed Initial Functi
Version: 3.1.15 - July 2024 | Updated Get-NetConfig, Added CIDR Table Generation and showSubnet and IPv6 Support
Version: 3.1.15.1 - July 2024 | Updated Get-NetConfig, Added CIDR Table Generation and showSubnet and IPv6 Support (Small fixes)
version: 3.1.16 - August 2024 | Created Get-EolInfo Function for End of Life Information https://endoflife.date/
Version: 3.1.16.1 - August 2024 | Created Get-PSProfileVersion Function to check latest release version
#>

# Oh My Posh Profile Version
$profileVersion = '3.1.16-dev'
$profileVersion = '3.1.16.1-dev'

# GitHub Repository Details
$gitRepositoryUrl = "https://api.github.com/repos/smoonlee/oh-my-posh-profile/releases"
Expand Down Expand Up @@ -93,7 +94,7 @@ if ($profileVersion -ne $newProfileReleaseTag) {
}

# Load Oh My Posh Application
oh-my-posh init powershell --config "$env:POSH_THEMES_PATH\themeNameHere" | Invoke-Expression
oh-my-posh init powershell --config "$env:POSH_THEMES_PATH\quick-term-azure.omp.json" | Invoke-Expression

# Local Oh-My-Posh Configuration
$env:POSH_AZURE_ENABLED = $true
Expand Down Expand Up @@ -285,6 +286,16 @@ function Get-PSProfileUpdate {
Register-PSProfile
}

# Function - Get PowerShell Profile Version
function Get-PSProfileVersion {
$newProfileReleases = Invoke-RestMethod -Uri $gitRepositoryUrl
$newProfilePreRelease = $newProfileReleases | Where-Object { $_.prerelease -eq $false } | Sort-Object -Property published_at -Descending
$newProfilePreReleaseTag = $newProfilePreRelease[0].tag_name

Write-Output "Latest Profile Release: $newProfilePreReleaseTag"
Write-Output "Current Local Profile Version: $profileVersion"
}

# Function - Update PowerShell Profile
function Update-PSProfile {
param (
Expand Down

0 comments on commit 19d5605

Please sign in to comment.