:-'Generic Commit'
All checks were successful
Build-Test-Publish / Build (push) Successful in 1m22s

This commit is contained in:
Your Name
2025-05-31 00:14:09 +12:00
parent 439ad79524
commit 4259f6d960
6 changed files with 74 additions and 2 deletions

View File

@@ -8,6 +8,8 @@
#include <memory>
#include <thread>
#include "version.hpp"
namespace simple_object_storage {
std::atomic<bool> g_running{true};
@@ -106,6 +108,14 @@ void signal_handler(int signal) {
}
int main(int argc, char* argv[]) {
if (argc > 1) {
if (std::string(argv[1]) == "version") {
std::cout << dropshell::VERSION << std::endl;
return 0;
}
std::cout << "simple_object_storage version: " << dropshell::VERSION << std::endl;
}
// Set up signal handlers
struct sigaction sa;
sa.sa_handler = signal_handler;

21
src/version.hpp.in Normal file
View File

@@ -0,0 +1,21 @@
#pragma once
/*
version.hpp is automatically generated by the build system, from version.hpp.in.
DO NOT EDIT VERSION.HPP!
*/
#include <string>
namespace dropshell {
// Version information
const std::string VERSION = "@PROJECT_VERSION@";
const std::string RELEASE_DATE = "@RELEASE_DATE@";
const std::string AUTHOR = "j842";
const std::string LICENSE = "MIT";
} // namespace dropshell