@niu2x/change-version
v1.0.5
Published
change project version
Readme
Change Version CLI
change-version is a command-line utility designed to update version numbers in project files. It currently supports CMake, NodeJS, and Doxygen projects. The tool automates the process of parsing and modifying version numbers within these files.
Features
- CMake: Automatically updates version numbers in
CMakeLists.txt. - NodeJS: Modifies the version in
package.json. - Doxygen: Adjusts version numbers in Doxygen configuration files.
Installation
You can install change-version via npm:
npm install -g @niu2x/change-versionUsage
The basic syntax for using change-version is as follows:
change-version <projectType> -i -v <newVersion> <filePath><projectType>: The type of project file to modify (CMake,NodeJS, orDoxygen).-i: In-place modification of the file.-v <newVersion>: The new version number to set.<filePath>: The path to the project file.
Examples
CMake
To update the version number in a CMakeLists.txt file:
change-version CMake -i -v 1.1.1 /path/to/CMakeLists.txtNodeJS
To change the version in a package.json file:
change-version Node -i -v 1.1.1 /path/to/package.jsonDoxygen
To update the version in a Doxygen configuration file:
change-version Doxygen -i -v 1.1.1 /path/to/Doxyfile