VOL-1674 - add version reporting information

Change-Id: Ie6cc244c66077467d371ffb3506ea0f4e817c197
diff --git a/rw_core/main.go b/rw_core/main.go
index 084e339..fc135f6 100644
--- a/rw_core/main.go
+++ b/rw_core/main.go
@@ -21,6 +21,7 @@
 	"fmt"
 	grpcserver "github.com/opencord/voltha-go/common/grpc"
 	"github.com/opencord/voltha-go/common/log"
+	"github.com/opencord/voltha-go/common/version"
 	"github.com/opencord/voltha-go/db/kvstore"
 	"github.com/opencord/voltha-go/kafka"
 	"github.com/opencord/voltha-go/rw_core/config"
@@ -210,6 +211,11 @@
 	fmt.Println("                                            ")
 }
 
+func printVersion() {
+	fmt.Println("VOLTHA Read-Write Core")
+	fmt.Println(version.VersionInfo.String("  "))
+}
+
 func main() {
 	start := time.Now()
 
@@ -238,6 +244,12 @@
 
 	defer log.CleanUp()
 
+	// Print verison / build information and exit
+	if cf.DisplayVersionOnly {
+		printVersion()
+		return
+	}
+
 	// Print banner if specified
 	if cf.Banner {
 		printBanner()