v0.0.3 - Refactor key-store module and remove redundant crypto wrappers
This commit is contained in:
@@ -84,18 +84,23 @@ update_version_in_header() {
|
||||
local major="$2"
|
||||
local minor="$3"
|
||||
local patch="$4"
|
||||
local version_file=""
|
||||
|
||||
if [[ ! -f "src/main.h" ]]; then
|
||||
print_error "src/main.h not found"
|
||||
if [[ -f "src/main.h" ]]; then
|
||||
version_file="src/main.h"
|
||||
elif [[ -f "src/main.c" ]]; then
|
||||
version_file="src/main.c"
|
||||
else
|
||||
print_error "Neither src/main.h nor src/main.c found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sed -i "s/#define NSIGNER_VERSION \".*\"/#define NSIGNER_VERSION \"$new_version\"/" src/main.h
|
||||
sed -i "s/#define NSIGNER_VERSION_MAJOR [0-9]\+/#define NSIGNER_VERSION_MAJOR $major/" src/main.h
|
||||
sed -i "s/#define NSIGNER_VERSION_MINOR [0-9]\+/#define NSIGNER_VERSION_MINOR $minor/" src/main.h
|
||||
sed -i "s/#define NSIGNER_VERSION_PATCH [0-9]\+/#define NSIGNER_VERSION_PATCH $patch/" src/main.h
|
||||
sed -i "s/#define NSIGNER_VERSION \".*\"/#define NSIGNER_VERSION \"$new_version\"/" "$version_file"
|
||||
sed -i "s/#define NSIGNER_VERSION_MAJOR [0-9]\+/#define NSIGNER_VERSION_MAJOR $major/" "$version_file"
|
||||
sed -i "s/#define NSIGNER_VERSION_MINOR [0-9]\+/#define NSIGNER_VERSION_MINOR $minor/" "$version_file"
|
||||
sed -i "s/#define NSIGNER_VERSION_PATCH [0-9]\+/#define NSIGNER_VERSION_PATCH $patch/" "$version_file"
|
||||
|
||||
print_success "Updated src/main.h to $new_version"
|
||||
print_success "Updated $version_file to $new_version"
|
||||
}
|
||||
|
||||
increment_version() {
|
||||
|
||||
Reference in New Issue
Block a user