aboutsummaryrefslogtreecommitdiff
path: root/src/lib/core
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2026-04-21 14:38:32 -0400
committerGitHub <noreply@github.com>2026-04-21 14:38:32 -0400
commitd91c7bd6a35e2d979aeb1c2d11c6d8a21b57e173 (patch)
treea9fab62b682e8b06c34192e447da6656ad034572 /src/lib/core
parente05702d1818088439fd017786a036103062db358 (diff)
parentee4c7beb65ddef497e9349d4ffc71d5bd58777cc (diff)
downloadstasis-d91c7bd6a35e2d979aeb1c2d11c6d8a21b57e173.tar.gz
Merge pull request #135 from jhunkeler/cmake-git-versionHEADmaster
Generate version string based on repository information
Diffstat (limited to 'src/lib/core')
-rw-r--r--src/lib/core/globals.c10
-rw-r--r--src/lib/core/include/core.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/core/globals.c b/src/lib/core/globals.c
index 63555a2..b84213e 100644
--- a/src/lib/core/globals.c
+++ b/src/lib/core/globals.c
@@ -3,10 +3,10 @@
#include "core.h"
#include "envctl.h"
-const char *VERSION = "1.0.0";
+const char *VERSION = STASIS_VERSION " (" STASIS_VERSION_BRANCH ")";
const char *AUTHOR = "Joseph Hunkeler";
const char *BANNER =
- "------------------------------------------------------------------------\n"
+ STASIS_BANNER_HEADER "\n"
#if defined(STASIS_DUMB_TERMINAL)
" STASIS \n"
#else
@@ -18,10 +18,10 @@ const char *BANNER =
" |_____/ |_/_/ \\_\\_____/|_____|_____/ \n"
"\n"
#endif
- "------------------------------------------------------------------------\n"
+ STASIS_BANNER_HEADER "\n"
" Delivery Generator \n"
- " v%s \n"
- "------------------------------------------------------------------------\n"
+ "%s\n"
+ STASIS_BANNER_HEADER "\n"
"Copyright (C) 2023-2025 %s,\n"
"Association of Universities for Research in Astronomy (AURA)\n";
diff --git a/src/lib/core/include/core.h b/src/lib/core/include/core.h
index c895267..9a2007c 100644
--- a/src/lib/core/include/core.h
+++ b/src/lib/core/include/core.h
@@ -10,7 +10,9 @@
#include <unistd.h>
#include <time.h>
#include <sys/statvfs.h>
+#include "version.h"
+#define STASIS_BANNER_HEADER "------------------------------------------------------------------------"
#define STASIS_BUFSIZ 8192
#define STASIS_NAME_MAX 255
#define STASIS_DIRSTACK_MAX 1024