diff --git a/increment_and_push.sh b/increment_and_push.sh index 5369856..c2b016a 100755 --- a/increment_and_push.sh +++ b/increment_and_push.sh @@ -188,17 +188,17 @@ update_version_in_header() { exit 1 fi - # Update VERSION macro - sed -i "s/#define VERSION \".*\"/#define VERSION \"$new_version\"/" src/main.h + # Update CRELAY_VERSION macro + sed -i "s/#define CRELAY_VERSION \".*\"/#define CRELAY_VERSION \"$new_version\"/" src/main.h - # Update VERSION_MAJOR macro - sed -i "s/#define VERSION_MAJOR [0-9]\+/#define VERSION_MAJOR $major/" src/main.h + # Update CRELAY_VERSION_MAJOR macro + sed -i "s/#define CRELAY_VERSION_MAJOR [0-9]\+/#define CRELAY_VERSION_MAJOR $major/" src/main.h - # Update VERSION_MINOR macro - sed -i "s/#define VERSION_MINOR .*/#define VERSION_MINOR $minor/" src/main.h + # Update CRELAY_VERSION_MINOR macro + sed -i "s/#define CRELAY_VERSION_MINOR .*/#define CRELAY_VERSION_MINOR $minor/" src/main.h - # Update VERSION_PATCH macro - sed -i "s/#define VERSION_PATCH [0-9]\+/#define VERSION_PATCH $patch/" src/main.h + # Update CRELAY_VERSION_PATCH macro + sed -i "s/#define CRELAY_VERSION_PATCH [0-9]\+/#define CRELAY_VERSION_PATCH $patch/" src/main.h print_success "Updated version in src/main.h to $new_version" } diff --git a/src/main.c b/src/main.c index 90b7515..651e4bf 100644 --- a/src/main.c +++ b/src/main.c @@ -20,6 +20,7 @@ #include "../nostr_core_lib/nostr_core/nostr_core.h" #include "../nostr_core_lib/nostr_core/nip013.h" // NIP-13: Proof of Work #include "../nostr_core_lib/nostr_core/nip019.h" // NIP-19: bech32-encoded entities +#include "main.h" // Version and relay metadata #include "config.h" // Configuration management system #include "sql_schema.h" // Embedded database schema #include "websockets.h" // WebSocket protocol implementation @@ -1426,7 +1427,7 @@ void print_usage(const char* program_name) { // Print version information void print_version() { - printf("C Nostr Relay Server %s\n", VERSION); + printf("C Nostr Relay Server %s\n", CRELAY_VERSION); printf("Event-based configuration system\n"); printf("Built with nostr_core_lib integration\n"); printf("\n"); diff --git a/src/main.h b/src/main.h index 256fbd5..b10fd3f 100644 --- a/src/main.h +++ b/src/main.h @@ -10,21 +10,18 @@ #define MAIN_H // Version information (auto-updated by build system) -#define VERSION_MAJOR 1 -#define VERSION_MINOR 1 -#define VERSION_PATCH 2 -#define VERSION "v1.1.2" - -// Avoid VERSION_MAJOR redefinition warning from nostr_core_lib -#undef VERSION_MAJOR -#define VERSION_MAJOR 1 +// Using CRELAY_ prefix to avoid conflicts with nostr_core_lib VERSION macros +#define CRELAY_VERSION_MAJOR 1 +#define CRELAY_VERSION_MINOR 1 +#define CRELAY_VERSION_PATCH 3 +#define CRELAY_VERSION "v1.1.3" // Relay metadata (authoritative source for NIP-11 information) #define RELAY_NAME "C-Relay" #define RELAY_DESCRIPTION "High-performance C Nostr relay with SQLite storage" #define RELAY_CONTACT "" #define RELAY_SOFTWARE "https://git.laantungir.net/laantungir/c-relay.git" -#define RELAY_VERSION VERSION // Use the same version as the build +#define RELAY_VERSION CRELAY_VERSION // Use the same version as the build #define SUPPORTED_NIPS "1,2,4,9,11,12,13,15,16,20,22,33,40,42,50,70" #define LANGUAGE_TAGS "" #define RELAY_COUNTRIES ""