@xairo/autoversion
v1.0.1
Published
A tool to update version numbers in files based on Git revision count
Readme
Git Version Updater
This project is a command-line tool designed to facilitate version management of your codebase using Semantic Versioning. It updates version numbers in specified files and commits changes to Git, streamlining the release process.
Table of Contents
Features
- Automatically updates Git status.
- Increments version numbers (major, minor, patch).
- Updates specified template files with new version and build date.
- Commits changes to Git automatically.
Installation
To install the tool globally, use npm:
npm install -g git-version-updaterUsage
Once installed, you can use the tool directly from the command line:
git-version-updater [command] [options]Commands
status
Updates the Git status file with modified files.
git-version-updater statuscommit
Updates version numbers and commits changes to Git.
Options:
-M, --major: Increment major version.-m, --minor: Increment minor version.-p, --patch: Increment patch version (default).-t, --template <file>: Specify a template file to update.
Example:
git-version-updater commit --minor --template path/to/template.txtupdate-commit
Updates Git status, version numbers, and commits changes in one command.
Options are the same as for the commit command.
Example:
git-version-updater update-commit --majorConfiguration
Version File
The current version is stored in version.json. If this file doesn't exist, it defaults to 0.1.0.
Status File
The tool uses a .zzz-git-status file to track modified files in the Git repository.
Template File
If specified, a template file will be updated with the new version and build date. Any occurrences of {version} and {date} in the file will be replaced.
