[pacman-dev] [PATCH 1/3] makepkg: Allowing for git & hg ref override.

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


>From 56d2a4c494c491f938eeb9b1173a1dad3950058b Mon Sep 17 00:00:00 2001
From: John Sumsion <john at sumsion.org>
Date: Sat, 3 Dec 2011 09:36:36 -0700
Subject: [PATCH 1/3] makepkg: Allowing for git & hg ref override.

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

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 0fa05dc..2a92f99 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1701,7 +1701,7 @@ devel_check() {
 				return 0
 			fi
 			msg "$(gettext "Determining latest %s revision...")" 'git'
-			newpkgver=$(date +%Y%m%d)
+			newpkgver=${_gitref:-$(date +%Y%m%d)}
 		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"
@@ -1731,7 +1731,7 @@ devel_check() {
 				hg clone $_hgroot/$_hgrepo ./src/$_hgrepo
 				cd ./src/$_hgrepo
 			fi
-			newpkgver=$(hg tip --template "{rev}")
+			newpkgver=${_hgref:-$(hg tip --template "{rev}")}
 			cd ../../
 		fi

-- 
1.7.8


More information about the pacman-dev mailing list