Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhitsolutions committed Mar 17, 2022
1 parent 2ef0c49 commit dc022ea
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 30 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: README
url: https://github.com/jdhitsolutions/WingetTools/blob/main/README.md
about: Open this module's README.md file.
- name: README
url: https://github.com/jdhitsolutions/WingetTools/blob/main/README.md
about: Open this module's README.md file.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog for WingetTools

## v1.2.0

+ Revised regex pattern in `Get-WGUpgrade` that wasn't parsing data properly. This is most likely the fix for [Issue #3](https://github.com/jdhitsolutions/WingetTools/issues/3) and [Issue #4](https://github.com/jdhitsolutions/WingetTools/issues/4).
+ Updated `README.md`.
+ Help updates.

## v1.1.1

+ Fixed bug in `Get-WGUpgrade` that wasn't parsing data properly. [Issue #3](https://github.com/jdhitsolutions/WingetTools/issues/3)
Expand Down
9 changes: 3 additions & 6 deletions WingetTools.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@{

RootModule = 'WingetTools.psm1'
ModuleVersion = '1.1.1'
ModuleVersion = '1.2.0'
CompatiblePSEditions = @('Desktop', 'Core')
GUID = '1130bb85-58d1-487d-9763-c38011f9613d'
Author = 'Jeff Hicks'
Expand All @@ -26,17 +26,14 @@
'Get-WGInstalled','Invoke-WGUpgrade', 'Get-WGUpgrade','Test-WGVersion'
AliasesToExport = 'wglatest', 'iwg'
PrivateData = @{

PSData = @{
Tags = @('winget', 'packagemanagement')
LicenseUri = 'https://github.com/jdhitsolutions/WingetTools/blob/main/LICENSE.txt'
ProjectUri = 'https://github.com/jdhitsolutions/WingetTools'
# IconUri = ''
ReleaseNotes = 'https://github.com/jdhitsolutions/WingetTools/blob/main/README.md'
}

} # End of PSData hashtable

} # End of PrivateData hashtable

}
}

41 changes: 21 additions & 20 deletions en-US/WingetTools-help.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,15 @@
<command:example>
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
<dev:code>PS C:\&gt; Get-WGInstalled
Name ID Version Description
---- -- ------- -----------
Foxit PDF Reader Foxit.FoxitReader 11.0.0.49893 Foxit is a powerful PDF reader
for viewing, filling out forms
and more.

Name ID Version
---- -- -------
Audacity Audacity.Audacity 3.1.3
CCleaner Piriform.CCleaner 5.90
Ubuntu Canonical.Ubuntu 2004.2021.825.0
...</dev:code>
<dev:remarks>
<maml:para></maml:para>
<maml:para>Actual output should also include the description.</maml:para>
</dev:remarks>
</command:example>
</command:examples>
Expand Down Expand Up @@ -306,11 +307,11 @@ Foxit PDF Reader Foxit.FoxitReader 11.0.0.49893 Foxit is a powerful PDF reader
<command:examples>
<command:example>
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
<dev:code>PS C:\&gt; get-wgpackage -name "Foxit PDF Reader"
<dev:code>PS C:\&gt; Get-WGPackage -name "Foxit PDF Reader"

Name ID Version Description
---- -- ------- -----------
Foxit PDF Reader Foxit.FoxitReader 11.0.0.49893 Foxit is a powerful PDF reader
Foxit PDF Reader Foxit.FoxitReader 11.2.1.53537 Foxit is a powerful PDF reader
for viewing, filling out forms
and more.</dev:code>
<dev:remarks>
Expand All @@ -319,25 +320,24 @@ Foxit PDF Reader Foxit.FoxitReader 11.0.0.49893 Foxit is a powerful PDF reader
</command:example>
<command:example>
<maml:title>-------------------------- Example 2 --------------------------</maml:title>
<dev:code>PS C:\&gt; Get-WGPackage -id "Microsoft.Powershell.Preview" | Select-Object *
<dev:code>PS C:\&gt; PS C:\&gt; Get-WGPackage -id "Microsoft.Powershell.Preview" | Select-Object *

Name : PowerShell Preview
ID : Microsoft.PowerShell.Preview
Version : 7.3.0-preview.1
Version : 7.3.0.2
Publisher : Microsoft Corporation
PublisherURL : pwsh-preview
PublisherSupport : PowerShell is a cross-platform (Windows, Linux, and macOS)
PublisherURL :
PublisherSupport :
Author :
Moniker : pwsh-preview
Description : PowerShell is a cross-platform (Windows, Linux, and macOS)
automation and configuration tool/framework that works well
with your existing tools and is optimized for dealing with
structured data (e.g. JSON, CSV, XML, etc.), REST APIs, and
object models. It includes a command-line shell, an
associated scripting language and a framework for processing
cmdlets.
Author : https://microsoft.com/PowerShell
Moniker : MIT
Description : https://github.com/PowerShell/PowerShell/blob/master/LICENSE.
txt
Homepage : Msi</dev:code>
Homepage : https://microsoft.com/PowerShell</dev:code>
<dev:remarks>
<maml:para>The output is a rich object.</maml:para>
</dev:remarks>
Expand All @@ -346,10 +346,11 @@ Homepage : Msi</dev:code>
<maml:title>-------------------------- Example 3 --------------------------</maml:title>
<dev:code>PS C:\&gt; winget search --tag powerbi | get-wgpackage | Select-Object Name,ID,Version


Name ID Version
---- -- -------
Microsoft PowerBI Desktop Microsoft.PowerBI 2.96.1061.0
DAX Studio DaxStudio.DaxStudio 2.16.2.632</dev:code>
DAX Studio DaxStudio.DaxStudio 2.17.3.683
Microsoft PowerBI Desktop Microsoft.PowerBI 2.102.845.0</dev:code>
<dev:remarks>
<maml:para>You can pipe the results of a winget search command to this function.</maml:para>
</dev:remarks>
Expand Down Expand Up @@ -696,7 +697,7 @@ PowerToys (Preview) Microsoft.PowerToys</dev:code>

Name ID Version Available
---- -- ------- ---------
PowerToys (Preview) Microsoft.PowerToys 0.47.0 0.51.1</dev:code>
PowerToys (Preview) Microsoft.PowerToys 0.55.1 0.56.1</dev:code>
<dev:remarks>
<maml:para>Get upgrades by ID.</maml:para>
</dev:remarks>
Expand Down
5 changes: 4 additions & 1 deletion functions/Get-WingetUpgrade.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ Function Get-WGUpgrade {
#a regex pattern to parse the output
#it looks like winget version 1.2.10271 changed the output for the upgrade command
#Revising the regex pattern. Issue #3
[regex]$r = "^(?<name>.*)\s+(?<id>\S+)\s+(?<version>\S+)\s+(?<available>\S+)$"
#"^(?<name>.*)\s+(?<id>\S+)\s+(?<version>\S+)\s+(?<available>\S+)$"

#updated regex again for Issue #4
[regex]$r = "^(?<name>.*?(?=\s*\w+\.))\s+(?<id>\S+)\s+(?<version>\S+)\s+(?<available>\S+)"
#"^(?<name>.*)\s+(?<id>\S+)\s+(?<version>\S+)\s+(?<available>\S+)\s+(?<source>\w+)$"
foreach ($item in $up) {
$g = $r.Match($item).groups
Expand Down

0 comments on commit dc022ea

Please sign in to comment.