[pacman-dev] [PATCH 2/3] makepkg: Teach git support to use 'git describe'.

John Sumsion john at sumsion.org
Wed Dec 7 19:28:49 EST 2011


>From ebecca0cd0760e3e808b5f411f336930b8ac8152 Mon Sep 17 00:00:00 2001
From: John Sumsion <john at sumsion.org>
Date: Sat, 3 Dec 2011 09:36:47 -0700
Subject: [PATCH 2/3] makepkg: Teach git support to use 'git describe'.

Signed-off-by: John Sumsion <john at sumsion.org>
---
 scripts/makepkg.sh.in |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 2a92f99..8a5eca0 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1701,7 +1701,8 @@ devel_check() {
 				return 0
 			fi
 			msg "$(gettext "Determining latest %s revision...")" 'git'
-			newpkgver=${_gitref:-$(date +%Y%m%d)}
+			newpkgver=${_gitref:-origin/master}
+			newpkgver=$(git describe --always ${newpkgver} | sed -e 's/-/_/g')
 		elif [[ -n ${_svntrunk} && -n ${_svnmod} ]] ; then
 			if ! type -p svn >/dev/null; then
 				warning "$(gettext "Cannot find the %s binary required to
determine latest %s revision.")" "svn" "svn"
-- 
1.7.8


More information about the pacman-dev mailing list