summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2023-08-04 16:02:22 +0900
committerRyo Nakamura <upa@haeena.net>2023-08-04 16:07:37 +0900
commit23d9577bdee1eea77769ed081c5950a059845f2d (patch)
treede91badb3c96337e118edb76a351628cf4c7cc6c /src/main.c
parent24c1bc9149eb8f1c383eaf16d94636b62d07c152 (diff)
introduce git-based versioning
MSCP_BUILD_VERSION (`git describe --tags --dirty --match "v*"`) is passed through include/mscp_version.h.in and cmake. When git is failed, use VERSION file instead (for building from source tar balls that excludes .git).
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index 7035215..17d147b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -11,18 +11,12 @@
#include <pthread.h>
#include <mscp.h>
+#include <mscp_version.h>
#include <util.h>
-#ifndef _VERSION /* passed through cmake */
-#define VERSION "(unknown)"
-#else
-#define VERSION _VERSION
-#endif
-
-
void usage(bool print_help) {
- printf("mscp v" VERSION ": copy files over multiple ssh connections\n"
+ printf("mscp " MSCP_BUILD_VERSION ": copy files over multiple ssh connections\n"
"\n"
"Usage: mscp [vqDHdNh] [-n nr_conns] [-m coremask] [-u max_startups]\n"
" [-s min_chunk_sz] [-S max_chunk_sz] [-a nr_ahead] [-b buf_sz]\n"