From ae8c817092c17be23f354b7ef93e4c8acb7e691f Mon Sep 17 00:00:00 2001 From: Maciej Wereski Date: Mon, 8 May 2017 10:38:00 +0200 Subject: [PATCH] Improve submit tag generation Some projects use version in their name. Unfortunately there may be some differences in branch name and project name on dowload server (e.g. tizen_3.0_common branch and 3.0-common directory). Because of that all dashes needs to be replaced with underscores when generating submit tag. Change-Id: I72be4d8c2f1d41a1ed68902da189900c32cccdfb Signed-off-by: Maciej Wereski --- snapsync.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snapsync.go b/snapsync.go index f9e9577..859412d 100644 --- a/snapsync.go +++ b/snapsync.go @@ -81,7 +81,7 @@ var ( // version prints snapsync and go versions and exits. func version() { - v := "1.0.0" + v := "1.0.1" fmt.Println("snapsync version: " + v + " (built with Go: " + runtime.Version() + ").") os.Exit(0) } @@ -89,7 +89,7 @@ func version() { // generateTag takes profile name and generates SR tag (as a string). func generateTag(project string) (tag string) { timestamp := time.Now().UTC().Format("20060102.150405") - tag = "submit/tizen_" + project + "/" + timestamp + tag = "submit/tizen_" + strings.Replace(project, "-", "_", -1) + "/" + timestamp return } -- 2.7.4