From 191fa2c9b32fd286ea69b4ae23d4c2d2c07709bd5d7500f1bad5447081d02aa3 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 26 Sep 2012 07:30:30 +0000 Subject: [PATCH] Accepting request 135648 from home:jirislaby:branches:openSUSE:Tools add support of "20120916" as versions in git OBS-URL: https://build.opensuse.org/request/show/135648 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm?expand=0&rev=50 --- obs-service-tar_scm.changes | 8 ++++++++ tar_scm | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/obs-service-tar_scm.changes b/obs-service-tar_scm.changes index 1bb3216..4178de3 100644 --- a/obs-service-tar_scm.changes +++ b/obs-service-tar_scm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Sep 24 11:47:27 UTC 2012 - jslaby@suse.com + +- add --date=short to get_vesion of git and remove '-' chars + by sed. This allows us to use %ad as versionformat and + have something like "20120916" as version instead of + terrible Unix timestamps. + ------------------------------------------------------------------- Fri Jul 27 11:16:47 UTC 2012 - aspiers@suse.com diff --git a/tar_scm b/tar_scm index b4714e9..0c10665 100644 --- a/tar_scm +++ b/tar_scm @@ -402,7 +402,7 @@ get_version () { case "$MYSCM" in git) #version=`safe_run git show --pretty=format:"$MYFORMAT" | head -n 1` - version=`safe_run git log -n1 --pretty=format:"$MYFORMAT"` + version=`safe_run git log -n1 --date=short --pretty=format:"$MYFORMAT"|sed 's@-@@g'` ;; svn) #rev=`LC_ALL=C safe_run svn info | awk '/^Revision:/ { print $2 }'`