16 lines
553 B
Bash
16 lines
553 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# Read the current version from the Makefile
|
||
|
current_version=$(sed -n 's/^VERSION = \(.*\)/\1/p' Makefile)
|
||
|
|
||
|
# Split the version into an array using '.' as the delimiter
|
||
|
IFS='.' read -ra version_parts <<< "$current_version"
|
||
|
|
||
|
# Increment the last part of the version
|
||
|
((version_parts[-1]++))
|
||
|
|
||
|
# Join the version parts back together with '.' as the delimiter
|
||
|
new_version=$(IFS=. ; echo "${version_parts[*]}")
|
||
|
|
||
|
# Replace the old version with the new one in the Makefile
|
||
|
sed -i "" "s/^VERSION = $current_version/VERSION = $new_version/g" Makefile
|