Automatically update git project version numbers by placing a .version file.
Supports various language projects including Maven/Gradle/Rust Cargo/Python setup.py.
sudo cp ugv /usr/local/binPrerequisites:
-
Place a
.versionfile in the project root directory with the version number, e.g.1.0.0. -
Mark the version number in files that need to be managed.
- Maven pom.xml
<version>1.0.0</version> <!-- managed by updgitver -->
- Gradle build.gradle
version = '1.0.0' // managed by updgitver
- Rust Cargo.toml
version = "1.0.0" # managed by updgitver
- Python setup.py
version = "1.0.0", # managed by updgitver
-
(Optional) The project is managed with
git.
Usage:
ugv 1.0.1Will execute in the following order:
- Create a Git tag
1.0.0_yyyymmddbased on the latest GitHEADand current date. - Create a Git branch
v1.0.0based on the latest GitHEAD. - Update version numbers in
pom.xml/build.gradle/Cargo.toml/setup.py. - Update version number in
.versionfile. - Commit and push.
gitsed- fdfind