summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd_version.c7
-rw-r--r--cmd_version.h4
-rw-r--r--version.h5
3 files changed, 15 insertions, 1 deletions
diff --git a/cmd_version.c b/cmd_version.c
index a2190ab..d919c60 100644
--- a/cmd_version.c
+++ b/cmd_version.c
@@ -5,7 +5,12 @@ void *cmd_version(void *data)
char *param = (char *)data;
char *ret = NULL;
+ const int buf_size = 128;
+ char buf[buf_size+1];
+
printf("VERSION\n");
- ret = alloc_new_str("v0.0.1\n");
+ snprintf(buf, buf_size, "VERSION:0.0.3" " DATE:" VERSION_DATE " COMMIT:" VERSION_COMMIT "\n");
+
+ ret = alloc_new_str(buf);
} \ No newline at end of file
diff --git a/cmd_version.h b/cmd_version.h
index ede27bb..23cd639 100644
--- a/cmd_version.h
+++ b/cmd_version.h
@@ -6,6 +6,10 @@
#include "util.h"
+
+//Auto generated in Makefile
+#include "version.h"
+
void *cmd_version(void *data);
#endif
diff --git a/version.h b/version.h
new file mode 100644
index 0000000..b5a65ab
--- /dev/null
+++ b/version.h
@@ -0,0 +1,5 @@
+#ifndef __VERSION_H
+#define __VERSION_H
+#define VERSION_DATE "Sun May 7 16:28:02 BST 2017"
+#define VERSION_COMMIT "417edbc Added new commands CMD,SHA1. Added support of params for commands. Fixed some bugs with uninitialised buffers"
+#endif