diff --git a/all_files.vcxitems b/all_files.vcxitems
index 6731d57..75efda4 100644
--- a/all_files.vcxitems
+++ b/all_files.vcxitems
@@ -159,6 +159,7 @@
+
diff --git a/cdc_rsync/BUILD b/cdc_rsync/BUILD
index 29a4fed..e285750 100644
--- a/cdc_rsync/BUILD
+++ b/cdc_rsync/BUILD
@@ -131,6 +131,7 @@ cc_library(
hdrs = ["params.h"],
deps = [
":cdc_rsync_client",
+ "//common:build_version",
"//common:port_range_parser",
"@com_github_zstd//:zstd",
"@com_google_absl//absl/status",
diff --git a/cdc_rsync/params.cc b/cdc_rsync/params.cc
index a74c17c..8f92d31 100644
--- a/cdc_rsync/params.cc
+++ b/cdc_rsync/params.cc
@@ -19,6 +19,7 @@
#include "absl/status/status.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_split.h"
+#include "common/build_version.h"
#include "common/path.h"
#include "common/port_range_parser.h"
#include "common/remote_util.h"
@@ -38,8 +39,7 @@ void PrintError(const absl::FormatSpec& format, Args... args) {
enum class OptionResult { kConsumedKey, kConsumedKeyValue, kError };
const char kHelpText[] =
- R"(Synchronize files and directories
-
+ R"(
Matching files are skipped based on file size and modified time. For partially
matching files only the differences are transferred. The destination directory
can be the same Windows machine or a remote Windows or Linux device.
@@ -323,6 +323,8 @@ OptionResult HandleParameter(const std::string& key, const char* value,
bool ValidateParameters(const Parameters& params, bool help) {
if (help) {
+ std::cout << "cdc_rsync - Synchronize files and directories. Version: "
+ << BUILD_VERSION << "\n";
std::cout << kHelpText;
return false;
}
diff --git a/cdc_rsync_server/BUILD b/cdc_rsync_server/BUILD
index e6c9551..8b69391 100644
--- a/cdc_rsync_server/BUILD
+++ b/cdc_rsync_server/BUILD
@@ -100,6 +100,7 @@ cc_binary(
"//cdc_rsync/base:cdc_interface",
"//cdc_rsync/base:message_pump",
"//cdc_rsync/base:server_exit_code",
+ "//common:build_version",
"//common:clock",
"//common:gamelet_component",
"//common:log",
diff --git a/cdc_rsync_server/main.cc b/cdc_rsync_server/main.cc
index 0fef17d..2ef0eef 100644
--- a/cdc_rsync_server/main.cc
+++ b/cdc_rsync_server/main.cc
@@ -14,6 +14,7 @@
#include "cdc_rsync/base/server_exit_code.h"
#include "cdc_rsync_server/cdc_rsync_server.h"
+#include "common/build_version.h"
#include "common/gamelet_component.h"
#include "common/log.h"
#include "common/status.h"
@@ -60,10 +61,16 @@ ServerExitCode GetExitCode(const absl::Status& status) {
} // namespace cdc_ft
int main(int argc, const char** argv) {
- if (argc < 2) {
- printf("Usage: cdc_rsync_server cdc_rsync_server