Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ param (
[string] $BuildFramework = "netstandard2.0"
)

if ( ! ( Get-Module -ErrorAction SilentlyContinue PSPackageProject) ) {
if ( -not (Get-Module -ErrorAction SilentlyContinue PSPackageProject) -and -not (Import-Module -PassThru -ErrorAction SilentlyContinue PSPackageProject -MinimumVersion 0.1.18) ) {
Install-Module -Name PSPackageProject -MinimumVersion 0.1.18 -Force
}

Expand Down
8 changes: 4 additions & 4 deletions help/Get-PSResourceRepository.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The Get-PSResourceRepository cmdlet searches for the PowerShell resource reposit
### Example 1
```
PS C:\> Get-PSResourceRepository -Name "PSGallery"
Name Url Trusted Priority
Name Uri Trusted Priority
---- --- ------- --------
PSGallery https://www.powershellgallery.com/api/v2 False 50
```
Expand All @@ -34,7 +34,7 @@ This example runs the command with the 'Name' parameter being set to "PSGallery"
### Example 2
```
PS C:\> Get-PSResourceRepository -Name "*Gallery"
Name Url Trusted Priority
Name Uri Trusted Priority
---- --- ------- --------
PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
PSGallery https://www.powershellgallery.com/api/v2 False 50
Expand All @@ -46,7 +46,7 @@ This example runs the command with the 'Name' parameter being set to "*Gallery"
### Example 3
```
PS C:\> Get-PSResourceRepository -Name "PSGallery","PoshTestGallery"
Name Url Trusted Priority
Name Uri Trusted Priority
---- --- ------- --------
PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
PSGallery https://www.powershellgallery.com/api/v2 False 50
Expand All @@ -58,7 +58,7 @@ This example runs the command with the 'Name' parameter being set to an array of
### Example 4
```
PS C:\> Get-PSResourceRepository -Name "*"
Name Url Trusted Priority
Name Uri Trusted Priority
---- --- ------- --------
PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
PSGallery https://www.powershellgallery.com/api/v2 False 50
Expand Down
24 changes: 12 additions & 12 deletions help/Register-PSResourceRepository.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Registers a repository for PowerShell resources.

### NameParameterSet (Default)
```
Register-PSResourceRepository [-Name] <String> [-URL] <String> [-Trusted] [-Priority <Int32>] [-PassThru]
Register-PSResourceRepository [-Name] <String> [-Uri] <String> [-Trusted] [-Priority <Int32>] [-PassThru]
[-WhatIf] [-Confirm] [<CommonParameters>]
```

Expand All @@ -36,32 +36,32 @@ The Register-PSResourceRepository cmdlet registers a repository for PowerShell r
These examples assume that the repository we attempt to register is not already registered on the user's machine.
### Example 1
```
PS C:\> Register-PSResourceRepository -Name "PoshTestGallery" -URL "https://www.powershellgallery.com/api/v2"
PS C:\> Register-PSResourceRepository -Name "PoshTestGallery" -Uri "https://www.powershellgallery.com/api/v2"
PS C:\> Get-PSResourceRepository -Name "PoshTestGallery"
Name Url Trusted Priority
Name Uri Trusted Priority
---- --- ------- --------
PoshTestGallery https://www.poshtestgallery.com/api/v2 False 50
```

This example registers the repository with the `-Name` of "PoshTestGallery" along with the associated `URL` value for it.
This example registers the repository with the `-Name` of "PoshTestGallery" along with the associated `Uri` value for it.

### Example 2
```
PS C:\> Register-PSResourceRepository -PSGallery
PS C:\> Get-PSResourceRepository -Name "PSGallery"
Name Url Trusted Priority
Name Uri Trusted Priority
---- --- ------- --------
PSGallery https://www.powershellgallery.com/api/v2 False 50
```

This example registers the "PSGallery" repository, with the 'PSGallery' parameter. Unlike the previous example, we cannot use the `-Name` or `-URL` parameters to register the "PSGallery" repository as it is considered Powershell's default repository store and has its own value for URL.
This example registers the "PSGallery" repository, with the 'PSGallery' parameter. Unlike the previous example, we cannot use the `-Name` or `-Uri` parameters to register the "PSGallery" repository as it is considered Powershell's default repository store and has its own value for Uri.

### Example 3
```
PS C:\> $arrayOfHashtables = @{Name = "psgettestlocal"; URL = "c:/code/testdir"},@{PSGallery = $True}
PS C:\> $arrayOfHashtables = @{Name = "psgettestlocal"; Uri = "c:/code/testdir"}, @{PSGallery = $True}
PS C:\> Register-PSResourceRepository -Repositories $arrayOfHashtables
PS C:\> Get-PSResourceRepository
Name Url Trusted Priority
Name Uri Trusted Priority
---- --- ------- --------
PSGallery https://www.powershellgallery.com/api/v2 False 50
psgettestlocal file:///c:/code/testdir False 50
Expand Down Expand Up @@ -149,9 +149,9 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -URL
### -Uri
Specifies the location of the repository to be registered.
URL can be of the following Uri schemas: HTTPS, HTTP, FTP, file share based.
Uri can be of the following Uri schemas: HTTPS, HTTP, FTP, file share based.

```yaml
Type: String
Expand Down Expand Up @@ -225,8 +225,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## NOTES
Repositories are unique by 'Name'. Attempting to register a repository with same 'Name' as an already registered repository will not successfully register.

Registering the PSGallery repository must be done via the PSGalleryParameterSet (i.e by using the 'PSGallery' parameter instead of 'Name' and 'URL' parameters).
Registering the PSGallery repository must be done via the PSGalleryParameterSet (i.e by using the 'PSGallery' parameter instead of 'Name' and 'Uri' parameters).

URL string input must be of one of the following Uri schemes: HTTP, HTTPS, FTP, File
Uri string input must be of one of the following Uri schemes: HTTP, HTTPS, FTP, File

## RELATED LINKS
24 changes: 12 additions & 12 deletions help/Set-PSResourceRepository.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Sets information for a registered repository.

### NameParameterSet (Default)
```
Set-PSResourceRepository [-Name] <String> [-URL <String>] [-Trusted] [-Priority <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-PSResourceRepository [-Name] <String> [-Uri <String>] [-Trusted] [-Priority <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### RepositoriesParameterSet
Expand All @@ -30,43 +30,43 @@ These examples are run independently of each other and assume the repositories u
### Example 1
```powershell
PS C:\> Get-PSResourceRepository -Name "PoshTestGallery"
Name Url Trusted Priority
Name Uri Trusted Priority
---- --- ------- --------
PoshTestGallery https://www.poshtestgallery.com/api/v2 False 50
PS C:\> Set-PSResourceRepository -Name "PoshTestGallery" -URL "c:/code/testdir" -PassThru
Name Url Trusted Priority
PS C:\> Set-PSResourceRepository -Name "PoshTestGallery" -Uri "c:/code/testdir" -PassThru
Name Uri Trusted Priority
---- --- ------- --------
PoshTestGallery file:///c:/code/testdir False 50
```

This example first checks if the PoshTestGallery repository has been registered. We wish to set the `-URL` value of this repository by running the Set-PSResourceRepository cmdlet with the `-URL` parameter and a valid Uri scheme url. We run the Get-PSResourceRepository cmdlet again to ensure that the `-URL` of the repository was changed. We also use the `-PassThru` parameter to see the changed repository.
This example first checks if the PoshTestGallery repository has been registered. We wish to set the `-Uri` value of this repository by running the Set-PSResourceRepository cmdlet with the `-Uri` parameter and a valid Uri scheme Uri. We run the Get-PSResourceRepository cmdlet again to ensure that the `-Uri` of the repository was changed. We also use the `-PassThru` parameter to see the changed repository.

### Example 2
```powershell
PS C:\> Get-PSResourceRepository -Name "PSGallery"
Name Url Trusted Priority
Name Uri Trusted Priority
---- --- ------- --------
PSGallery https://www.powershellgallery.com/api/v2 False 50
PS C:\> Set-PSResourceRepository -Name "PSGallery" -Priority 25 -Trusted -PassThru
Name Url Trusted Priority
Name Uri Trusted Priority
---- --- ------- --------
PSGallery https://www.powershellgallery.com/api/v2 True 25
```

This example first checks if the PSGallery repository has been registered. We wish to set the `-Priority` and `-Trusted` values of this repository by running the Set-PSResourceRepository cmdlet with the `-Priority` parameter set to a value between 0 and 50 and by using the `-Trusted` parameter switch. We run the Get-PSResourceRepository cmdlet again to ensure that the `-Priority` and `-Trusted` values of the repository were changed. An important note here is that just for the default PSGallery repository, the `-URL` value can't be changed/set. We also use the `-PassThru` parameter to see the changed repository.
This example first checks if the PSGallery repository has been registered. We wish to set the `-Priority` and `-Trusted` values of this repository by running the Set-PSResourceRepository cmdlet with the `-Priority` parameter set to a value between 0 and 50 and by using the `-Trusted` parameter switch. We run the Get-PSResourceRepository cmdlet again to ensure that the `-Priority` and `-Trusted` values of the repository were changed. An important note here is that just for the default PSGallery repository, the `-Uri` value can't be changed/set. We also use the `-PassThru` parameter to see the changed repository.

### Example 3
```powershell
PS C:\> Get-PSResourceRepository -Name "*"
Name Url Trusted Priority
Name Uri Trusted Priority
---- --- ------- --------
PSGallery https://www.powershellgallery.com/api/v2 False 50
PoshTestGallery https://www.poshtestgallery.com/api/v2 False 50

PS C:\> $arrayOfHashtables = @{Name = "PSGallery"; Trusted = $True},@{Name = "PoshTestGallery"; URL = "c:/code/testdir"}
PS C:\> $arrayOfHashtables = @{Name = "PSGallery"; Trusted = $True}, @{Name = "PoshTestGallery"; Uri = "c:/code/testdir"}

PS C:\> Set-PSResourceRepository -Repositories $arrayOfHashtables -PassThru
Name Url Trusted Priority
Name Uri Trusted Priority
---- --- ------- --------
PSGallery https://www.powershellgallery.com/api/v2 True 50
PoshTestGallery file:///c:/code/testdir False 50
Expand Down Expand Up @@ -121,7 +121,7 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -URL
### -Uri
Specifies the location of the repository to be set.

```yaml
Expand Down
6 changes: 3 additions & 3 deletions help/Unregister-PSResourceRepository.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ In this example, we assume the repository "PoshTestGallery" has been previously
### Example 2
```
PS C:\> Get-PSResourceRepository
Name Url Trusted Priority
Name Uri Trusted Priority
---- --- ------- --------
PoshTestGallery https://www.poshtestgallery.com/api/v2 True 40
PSGallery https://www.powershellgallery.com/api/v2 False 50
psgettestlocal file:///c:/code/testdir True 50

PS C:\> Unregister-PSResourceRepository -Name "PoshTestGallery","psgettestlocal"
PS C:\> Get-PSResourceRepository
Name Url Trusted Priority
Name Uri Trusted Priority
---- --- ------- --------
PSGallery https://www.powershellgallery.com/api/v2 False 50

Expand Down Expand Up @@ -75,7 +75,7 @@ Passes the resource installed to the console.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Aliases:

Required: False
Position: Named
Expand Down
4 changes: 2 additions & 2 deletions src/PSGet.Format.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@
<TableControl>
<TableHeaders>
<TableColumnHeader><Label>Name</Label></TableColumnHeader>
<TableColumnHeader><Label>Url</Label></TableColumnHeader>
<TableColumnHeader><Label>Uri</Label></TableColumnHeader>
<TableColumnHeader><Label>Trusted</Label></TableColumnHeader>
<TableColumnHeader><Label>Priority</Label></TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem><PropertyName>Name</PropertyName></TableColumnItem>
<TableColumnItem><PropertyName>Url</PropertyName></TableColumnItem>
<TableColumnItem><PropertyName>Uri</PropertyName></TableColumnItem>
<TableColumnItem><PropertyName>Trusted</PropertyName></TableColumnItem>
<TableColumnItem><PropertyName>Priority</PropertyName></TableColumnItem>
</TableColumnItems>
Expand Down
2 changes: 1 addition & 1 deletion src/PowerShellGet.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ See change log (CHANGELOG.md) at https://github.com/PowerShell/PowerShellGet
}
}

HelpInfoURI = 'http://go.microsoft.com/fwlink/?linkid=855963'
HelpInfoUri = 'http://go.microsoft.com/fwlink/?linkid=855963'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fsackur can you please revert this change specifically? Like just change it back to "HelpInfoURI".
This variable is uppercased "URI" (i.e HelpInfoURI) in the module manifest files for packages on PSGallery. Example: https://www.powershellgallery.com/packages/PowerShellGet/2.2.5/Content/PowerShellGet.psd1 L286).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I just noticed 'ProjectUri' and 'LicenseUri' both have Uri in Pascal case, so I think we should leave this as is for now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay that makes sense. I'll merge the PR in then :)

}
Loading