Update-PSScriptBuilderBumpFiles¶
Updates configured project files with current version information.
Description¶
Applies the current release data's tokens to every file configured in
psscriptbuilder.bumpconfig.json — Simple Token Mode, Regex Pattern Mode, or a mix of both. See
Apply Tokens to Project Files
for the full workflow, and Configure Bump Files
for how a file's tokens/patterns are set up in the first place.
Before writing any change to disk, a backup of each target file is created; if an error occurs during processing, the originals are restored from their backups, leaving every project file in a consistent state.
A warning is emitted for any configured file whose entries all failed to match its current content — most commonly a Placeholder-mode entry with no Regex-mode fallback, already consumed by an earlier run. Add a Regex-mode entry (Mixed Mode) to keep matching on subsequent runs.
This cmdlet also supports -WhatIf and -Confirm (PowerShell's ShouldProcess pattern).
Parameters¶
This cmdlet takes no parameters beyond the common ones and -WhatIf/-Confirm.
Examples¶
Preview which files would change¶
Apply tokens and display what changed¶
File : C:\Projects\MyProject\src\MyProject.ps1
Token : VERSION
Old Value : {{VERSION}}
New Value : 0.1.1
Token : BUILD_TIMESTAMP
Old Value : {{BUILD_TIMESTAMP}}
New Value : 2026-09-14T12:55:50Z
File : C:\Projects\MyProject\build\Output\MyModule.psd1
Pattern : ModuleVersion\s*=\s*'({REGEX_VERSION})'
Token : VERSION
Old Value : ModuleVersion = '0.1.0'
New Value : ModuleVersion = '0.1.1'
Output¶
Returns a
PSScriptBuilderBumpFilesResult object.