Auto Version Increment
Versioner to automatically update the Version Information inside the code & automatically generate Git commit including the updated Version Information.
Features
- Semantic Versioning (0.0.0), Included With Build Number (0.0.0.0) or Included With Text (0.0.0.Alfa)
- Automatically generate Git commit including the Version Information
- Define settings per Workspace
- Update version information using Icon, Commands, Keyboard Shortcut, On Save & On Debug
- It works with All Type of files
- Update Version Information in Multiple Files at once (Files can have different version type & number)
- It doesn't require the target file(s) to be opened in the editor
Requirements
- VS Code Git extension (If using Git Command with UI Option)
Extension Settings
This extension contributes the following settings:
auto-version-increment.version.file
: Define the Path, Prefix, Sufix, if the file is the primary & useWorkspacePath to get & update the version
auto-version-increment.info.statusBar
: Show/Hide the version info in the status bar (VS Code restart is required)
auto-version-increment.info.notificationBar
: Enable/Disable the update information notification
auto-version-increment.update.autoLastDigit
: Define if the Build Number should be also updated while updating Major, Minor or Patch/Revision
auto-version-increment.info.versionRules
: Define if the Semantic Versioning Rules should apply
auto-version-increment.update.versionDigit
: Define the version digit that should be automatically updated by Main Command
auto-version-increment.update.onSave
: Define if the version information should be updated On Save
auto-version-increment.update.onDebug
: Define if the version information should be updated On Debug
auto-version-increment.git.method
: Define if the Git Commit should be executed inside the Terminal | the VS Code Source Control UI, to be used with Commit Command
auto-version-increment.git.commit
: Define a commit message to be used with Commit Command
Note: useWorkspacePath require a Folder | a Workspace to be open to work.
Note: At least One Primary file is required for version information to be displayed on status bar | in notification.
Note: The Path in the Windows OS should be separated by "\" instead of "/".
Note: The part of the Version which includes the Text will NOT be automatically updated.
Getting Started
This extension work based on matching worlds in the target file(s), it use Prefix & Sufix to find the version, update it & save it to the target file(s).
Example in a PHP file:
Path: C:\Directory\File.php | if useWorkspacePath is true: Path: File.php
<?php $version = '0.0.1'; ?>
Here, the Prefix will be version = '
& the Sufix will be ';
.
Update using Keyboard Shortcut :
- Ctrl + Alt + W for Windows & Linux & Cmd + Alt + W for Mac (Global command, update the Version based on Settings)
- Ctrl + Alt + 1 for Windows & Linux & Cmd + Alt + 1 for Mac (Update the Major digit)
- Ctrl + Alt + 2 for Windows & Linux & Cmd + Alt + 2 for Mac (Update the Minor digit)
- Ctrl + Alt + 3 for Windows & Linux & Cmd + Alt + 3 for Mac (Update the Patch/Revision digit)
Update using Commands :
- Version: Update Version for Global command (Update the Version based on Settings)
- Version: Update Major (Update the Major digit)
- Version: Update Minor (Update the Minor digit)
- Version: Update Patch (Update the Patch/Revision digit)
Git Commands :
- Version: Commit (Generate a commit based on the input text | the predefined text from the setting)
Note: The Commit command with Terminal works only if there is an active terminal & file(s) are already staged.
Note: The input text set with Commit command has the Higher priority than the predefined text from setting.
Note: The token {version} should be used within the text to be replaced by the current Version Information
Release Notes
1.6.5.1495
Bug Fix:
- Fix the problem when string inside the Version & updating the Version On Save & On Debug
Upcoming Features
- Add support for Remote file(s)
Known Issues
- Conflict if there are Multiple Words in the target file used as Prefix & Sufix (Top Priority)
HAPPY CODING :)