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
This commit is contained in:
Stephan Kulow 2012-09-26 07:30:30 +00:00 committed by Git OBS Bridge
parent 86c7651c97
commit 191fa2c9b3
2 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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 }'`