-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added version update notification #1424
base: main
Are you sure you want to change the base?
Conversation
[Parameter(Mandatory = $false, ParameterSetName = 'Configuration')] | ||
[ValidateNotNullOrEmpty()] | ||
[ValidateSet($true, $false)] | ||
[switch] | ||
$DisableVersionCheck = [ScubaConfig]::ScubaDefault('DisableVersionCheck'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to make this an env
variable.
If we make DisableVersionCheck
a env
variable, then CheckVersion.psm1
can be added as a script in ScriptsToProcess
in the manifest.
The update notification would trigger on ScubaGear import rather than on Invoke-SCuBA
.
PnP PowerShell does this and it's more flexible than the other PowerShell modules that tie the update notification check to parameters to their authentication cmdlets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still testing, but don't forget to update the README to describe the new parameter (or env variable).
Adds notification of version update availability
🗣 Description
This pull request resolves #1285 by introducing a new configuration option,
DisableVersionCheck
, to theScubaConfig
module and to the orchestrator module as a command line switch. Setting this option to$false
enables version checks within the orchestrator. The checks will target both PSGallery and Github in an attempt to determine whether a newer release is available. If a new release is available, a warning is printed to the console.💭 Motivation and context
Users get the best possible assessment by using the latest version of the ScubaGear tool, with the latest baselines. Later versions incorporate updates, fixes, and enhancements. A mechanism to notify users of a new version when running ScubaGear.
🧪 Testing
I tested these changes by modifying the
ScubaConfig
module and verifying that:DisableVersionCheck
parameter enables or disables checks when set in the config file✅ Pre-approval checklist
✅ Pre-merge checklist
✅ Post-merge checklist