Version v0.3.29 - Update versioning system

This commit is contained in:
2025-12-18 09:33:18 -04:00
parent 4bd0c5aa42
commit 1d6f4a225d
5 changed files with 15 additions and 16 deletions

View File

@@ -146,20 +146,14 @@ increment_version() {
update_source_version() {
local NEW_VERSION="$1"
print_status "Updating version strings in source code..."
print_status "Updating version constant in source code..."
# Replace hardcoded version strings in src/otp.c with the current git tag
if [ -f "src/otp.c" ]; then
# Update main menu version
sed -i "s/OTP v[0-9]\+\.[0-9]\+\.[0-9]\+/OTP $NEW_VERSION/g" src/otp.c
# Update ASCII output version
sed -i "s/Version: v[0-9]\+\.[0-9]\+\.[0-9]\+/Version: $NEW_VERSION/g" src/otp.c
# Update usage/help text version
sed -i "s/Implementation v[0-9]\+\.[0-9]\+\.[0-9]\+/Implementation $NEW_VERSION/g" src/otp.c
print_success "Updated version strings in src/otp.c to $NEW_VERSION"
# Update OTP_VERSION constant in src/main.h
if [ -f "src/main.h" ]; then
sed -i "s/#define OTP_VERSION \"v[0-9]\+\.[0-9]\+\.[0-9]\+\"/#define OTP_VERSION \"$NEW_VERSION\"/g" src/main.h
print_success "Updated OTP_VERSION in src/main.h to $NEW_VERSION"
else
print_warning "src/otp.c not found - skipping version string updates"
print_warning "src/main.h not found - skipping version update"
fi
}