Skip to content

Commit

Permalink
fix new parameter in build.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju authored and gaelcolas committed Sep 24, 2023
1 parent 148da13 commit 9158f6d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
21 changes: 14 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Using ModuleFast will resolve dependencies much faster, but requires
PowerShell 7.2.
- Support for [PSResourceGet (beta release)](https://github.com/PowerShell/PSResourceGet).
If the modules PSResourceGet and PowerShellGet v2.9.0 (previous _CompatPowerShellGet_)
can be bootstrapped they will be used. If PSResourceGet cannot be
bootstrapped then it will revert to using PowerShellGet v2.2.5. If the
user requests or configures to use ModuleFast then that will override
both PSResourceGet and PowerShellGet. It is also possible to use
PSResourceGet by adding the parameter `UsePSResourceGet` to the `build.ps1`,
e.g. `./build.ps1 -Tasks noop -ResolveDependency -UseModuleFast`.
If the modules PSResourceGet can be bootstrapped they will be used. If
PSResourceGet cannot be bootstrapped then it will revert to using
PowerShellGet v2.2.5. If the user requests or configures to use ModuleFast
then that will override both PSResourceGet and PowerShellGet. The method
PSResourceGet can be enabled in the configuration file Resolve-Dependency.psd1.
It is also possible to use PSResourceGet by adding the parameter `UsePSResourceGet`
to the `build.ps1`, e.g. `./build.ps1 -Tasks noop -ResolveDependency -UsePSResourceGet`.
- When using PSResourceGet to resolve dependencies it also possible to
use PowerShellGet v2.9.0 (previous _CompatPowerShellGet_). To use the
compatibility module it can be enabled in the configuration file Resolve-Dependency.psd1.
It is also possible to use it by adding the parameter `UsePowerShellGetCompatibilityModule`
to the `build.ps1`, e.g. `./build.ps1 -Tasks noop -ResolveDependency -UsePSResourceGet -UsePowerShellGetCompatibilityModule`.
_The 2.9.0-preview has since then been unlisted, the compatibility_
_module will now be released as PowerShellGet v3.0.0._

### Changed

Expand Down
11 changes: 10 additions & 1 deletion Sampler/Templates/Build/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
.PARAMETER UsePSResourceGet
Specifies to use PSResourceGet instead of PowerShellGet to resolve dependencies
faster. This can also be configured in Resolve-Dependency.psd1.
.PARAMETER UsePowerShellGetCompatibilityModule
Specifies to use the compatibility module PowerShellGet. This parameter
only works then the method of downloading dependencies is PSResourceGet.
This can also be configured in Resolve-Dependency.psd1.
#>
[CmdletBinding()]
param
Expand Down Expand Up @@ -137,7 +142,11 @@ param

[Parameter()]
[System.Management.Automation.SwitchParameter]
$UsePSResourceGet
$UsePSResourceGet,

[Parameter()]
[System.Management.Automation.SwitchParameter]
$UsePowerShellGetCompatibilityModule
)

<#
Expand Down
11 changes: 10 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
.PARAMETER UsePSResourceGet
Specifies to use PSResourceGet instead of PowerShellGet to resolve dependencies
faster. This can also be configured in Resolve-Dependency.psd1.
.PARAMETER UsePowerShellGetCompatibilityModule
Specifies to use the compatibility module PowerShellGet. This parameter
only works then the method of downloading dependencies is PSResourceGet.
This can also be configured in Resolve-Dependency.psd1.
#>
[CmdletBinding()]
param
Expand Down Expand Up @@ -137,7 +142,11 @@ param

[Parameter()]
[System.Management.Automation.SwitchParameter]
$UsePSResourceGet
$UsePSResourceGet,

[Parameter()]
[System.Management.Automation.SwitchParameter]
$UsePowerShellGetCompatibilityModule
)

<#
Expand Down

0 comments on commit 9158f6d

Please sign in to comment.