v1.1.3 - Rename VERSION to CRELAY_VERSION to avoid conflict with nostr_core_lib

This commit is contained in:
Your Name
2026-02-01 10:02:19 -04:00
parent 11b0a88cdd
commit 7bf0757b1f
3 changed files with 16 additions and 18 deletions

View File

@@ -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"
}

View File

@@ -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");

View File

@@ -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 ""