Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhitsolutions committed Jan 24, 2022
1 parent 6dac79f commit 170677a
Show file tree
Hide file tree
Showing 11 changed files with 378 additions and 23 deletions.
9 changes: 9 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog for WingetTools

## v1.0.0

+ Fixed bug with `Get-WGUpgrade` that had bad formatting when running the command either first thing in the day, or when some sort of caching was getting cleared.
+ Added command `Test-WGVersion` and format file `wgversion.format.ps1xml`.
+ Updated `Get-WGReleaseNote` to include the online link.
+ Modified the object typename for `Get-WGReleaseNote` to align it with other object names in this module. __*This is a breaking change.*__
+ Updated help documentation.
+ Updated `README.md`.

## v0.7.0

+ Added `Get-WGUpgrade` and `Invoke-WGUpgrade`.
Expand Down
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,9 @@ Available : 0.51.1

![install upgrade](images/install-upgrade.png)

There is a known issue that when you run `Get-WGUpgrade` on a new day, there is extra garbage in the output.

![get-wgupgrade bug](images/get-wgupgrade-bug.png)

This is under investigation.

## [Invoke-WGUpgrade](docs/Invoke-WGUpgrade.md)

Invoke-WGUpgrade will run the winget upgrade process using silent installation and accepting all licenses and agreements. It supports `-Whatif`.
`Invoke-WGUpgrade` will run the winget upgrade process using silent installation and accepting all licenses and agreements. It supports `-Whatif`.

```dos
PS C:\> Get-WGUpgrade -Name p* | Invoke-WGUpgrade -WhatIf
Expand All @@ -99,6 +93,27 @@ What if: Performing the operation "Upgrade from 0.47.0 to 0.51.1" on target "Mic

Be aware, that winget may still have a problem running the upgrade due to issues isolating upgrade packages.

## [Test-WGVersion](docs/Test-WGVersion.md)

The test command is an easy way to determine if an update for winget itself is available from Github.

```dos
PS C:\> Test-WGVersion
Installed Online Update Command
--------- ------ ------ -------
1.1.13405 1.1.12653 False C:\Users\Jeff\AppData\Local\Microsoft\Windo…
```

If an update is available and you are running the command in the PowerShell console or VSCode, the `Update` value will be displayed in green.

You can use the `-Quiet` parameter to return a Boolean result.

```dos
PS C:\> Test-WGVersion -Quiet
False
```

## Issues

If there are problems with commands in this module, try running the winget command directly. Report problems to the module's Github repository at <https://github.com/jdhitsolutions/WingetTools/issues>.
Expand Down
12 changes: 8 additions & 4 deletions WingetTools.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@{

RootModule = 'WingetTools.psm1'
ModuleVersion = '0.7.0'
ModuleVersion = '1.0.0'
CompatiblePSEditions = @('Desktop', 'Core')
GUID = '1130bb85-58d1-487d-9763-c38011f9613d'
Author = 'Jeff Hicks'
Expand All @@ -17,9 +17,13 @@
# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()

FormatsToProcess = @('formats\wgpackage.format.ps1xml', 'formats\wingetupgrade.format.ps1xml')
FunctionsToExport = 'Get-WGPackage', 'Install-Winget', 'Get-WGReleaseNote', 'Get-WGInstalled',
'Invoke-WGUpgrade', 'Get-WGUpgrade'
FormatsToProcess = @(
'formats\wgpackage.format.ps1xml',
'formats\wgversion.format.ps1xml',
'formats\wingetupgrade.format.ps1xml'
)
FunctionsToExport = 'Get-WGPackage', 'Install-Winget', 'Get-WGReleaseNote',
'Get-WGInstalled','Invoke-WGUpgrade', 'Get-WGUpgrade','Test-WGVersion'
AliasesToExport = 'wglatest', 'iwg'
PrivateData = @{

Expand Down
5 changes: 4 additions & 1 deletion docs/Get-WGReleaseNote.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Notes : This release represents our Windows Package Manager 1.release
#797 Silent install of "winget install git.git" is not working
#1497 Make rename retry more frequently for longer, then try
making a hardlink
Link : https://github.com/microsoft/winget-cli/releases/tag/v1.1.12653
```

The default output.
Expand Down Expand Up @@ -151,7 +152,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### System.String
### ReleaseNote
### WGReleaseNote
## NOTES
Expand All @@ -160,3 +161,5 @@ Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell
## RELATED LINKS
[Install-WinGet](Install-WinGet.md)
[Test-WGVersion](Test-WGVersion.md)
8 changes: 8 additions & 0 deletions docs/Invoke-WGUpgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ What if: Performing the operation "Upgrade from 0.47.0 to 0.51.1" on target "Mic

You can pipe output from Get-WGUpgrade to this command.

### Example 3

```powershell
PS C:\> Get-WGUpgrade | Out-GridView -OutputMode Multiple | Invoke-WGUpgrade
```

Pipe the list of available upgrades to Out-Gridview where you can select items. Invoke-WGUpgrade will then install the selected upgrades.

## PARAMETERS

### -Confirm
Expand Down
83 changes: 83 additions & 0 deletions docs/Test-WGVersion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
external help file: WingetTools-help.xml
Module Name: WingetTools
online version:
schema: 2.0.0
---

# Test-WGVersion

## SYNOPSIS

Test Winget version

## SYNTAX

```yaml
Test-WGVersion [-Quiet] [<CommonParameters>]
```

## DESCRIPTION

Test-WGVersion is a simple command you use to discover if you need to update winget.

## EXAMPLES

### Example 1

```powershell
PS C:\> Test-WGVersion
Installed Online Update Command
--------- ------ ------ -------
1.1.13405 1.1.12653 False C:\Users\Jeff\AppData\Local\Microsoft\Windo…
```

The default output is an object showing the currently installed version and the latest stable version online. If an update is available, and you are running in the PowerShell console or VS Code, the Update value will be displayed in Green.

### Example 2

```powershell
PS C:\> Test-WGVersion -Quiet
False
```

Run the test and get a simple, Boolean result indicating if an update is available.

## PARAMETERS

### -Quiet

Get a Boolean result indicating if an update is available.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### System.Management.Automation.SwitchParameter
## OUTPUTS
### Boolean
### WGVersion
## NOTES
## RELATED LINKS
[Get-WGReleaseNote](Get-WGReleaseNote.md)
119 changes: 117 additions & 2 deletions en-US/WingetTools-help.xml
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ DAX Studio DaxStudio.DaxStudio 2.16.2.632</dev:code>
</command:returnValue>
<command:returnValue>
<dev:type>
<maml:name>ReleaseNote</maml:name>
<maml:name>WGReleaseNote</maml:name>
</dev:type>
<maml:description>
<maml:para></maml:para>
Expand Down Expand Up @@ -509,7 +509,8 @@ Notes : This release represents our Windows Package Manager 1.release
# Bugs
#797 Silent install of "winget install git.git" is not working
#1497 Make rename retry more frequently for longer, then try
making a hardlink</dev:code>
making a hardlink
Link : https://github.com/microsoft/winget-cli/releases/tag/v1.1.12653</dev:code>
<dev:remarks>
<maml:para>The default output.</maml:para>
</dev:remarks>
Expand Down Expand Up @@ -562,6 +563,10 @@ Notes : This release is the first development build after the Windows
<maml:linkText>Install-WinGet</maml:linkText>
<maml:uri></maml:uri>
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Test-WGVersion</maml:linkText>
<maml:uri></maml:uri>
</maml:navigationLink>
</command:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
Expand Down Expand Up @@ -1059,6 +1064,13 @@ What if: Performing the operation "Upgrade from 0.47.0 to 0.51.1" on target "Mic
<maml:para>You can pipe output from Get-WGUpgrade to this command.</maml:para>
</dev:remarks>
</command:example>
<command:example>
<maml:title>-------------------------- Example 3 --------------------------</maml:title>
<dev:code>PS C:\&gt; Get-WGUpgrade | Out-GridView -OutputMode Multiple | Invoke-WGUpgrade</dev:code>
<dev:remarks>
<maml:para>Pipe the list of available upgrades to Out-Gridview where you can select items. Invoke-WGUpgrade will then install the selected upgrades.</maml:para>
</dev:remarks>
</command:example>
</command:examples>
<command:relatedLinks>
<maml:navigationLink>
Expand All @@ -1067,4 +1079,107 @@ What if: Performing the operation "Upgrade from 0.47.0 to 0.51.1" on target "Mic
</maml:navigationLink>
</command:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<command:details>
<command:name>Test-WGVersion</command:name>
<command:verb>Test</command:verb>
<command:noun>WGVersion</command:noun>
<maml:description>
<maml:para>Test Winget version</maml:para>
</maml:description>
</command:details>
<maml:description>
<maml:para>Test-WGVersion is a simple command you use to discover if you need to update winget.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Test-WGVersion</maml:name>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none">
<maml:name>Quiet</maml:name>
<maml:description>
<maml:para>Get a Boolean result indicating if an update is available.</maml:para>
</maml:description>
<dev:type>
<maml:name>SwitchParameter</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>False</dev:defaultValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none">
<maml:name>Quiet</maml:name>
<maml:description>
<maml:para>Get a Boolean result indicating if an update is available.</maml:para>
</maml:description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
<dev:type>
<maml:name>SwitchParameter</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue>False</dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name>System.Management.Automation.SwitchParameter</maml:name>
</dev:type>
<maml:description>
<maml:para></maml:para>
</maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name>Boolean</maml:name>
</dev:type>
<maml:description>
<maml:para></maml:para>
</maml:description>
</command:returnValue>
<command:returnValue>
<dev:type>
<maml:name>WGVersion</maml:name>
</dev:type>
<maml:description>
<maml:para></maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<maml:alertSet>
<maml:alert>
<maml:para></maml:para>
</maml:alert>
</maml:alertSet>
<command:examples>
<command:example>
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
<dev:code>PS C:\&gt; Test-WGVersion

Installed Online Update Command
--------- ------ ------ -------
1.1.13405 1.1.12653 False C:\Users\Jeff\AppData\Local\Microsoft\Windo…</dev:code>
<dev:remarks>
<maml:para>The default output is an object showing the currently installed version and the latest stable version online. If an update is available, and you are running in the PowerShell console or VS Code, the Update value will be displayed in Green.</maml:para>
</dev:remarks>
</command:example>
<command:example>
<maml:title>-------------------------- Example 2 --------------------------</maml:title>
<dev:code>PS C:\&gt; Test-WGVersion -Quiet
False</dev:code>
<dev:remarks>
<maml:para>Run the test and get a simple, Boolean result indicating if an update is available.</maml:para>
</dev:remarks>
</command:example>
</command:examples>
<command:relatedLinks>
<maml:navigationLink>
<maml:linkText>Get-WGReleaseNote</maml:linkText>
<maml:uri></maml:uri>
</maml:navigationLink>
</command:relatedLinks>
</command:command>
</helpItems>
Loading

0 comments on commit 170677a

Please sign in to comment.