[pacman-dev] [PATCH 1/3] makepkg: Allowing for git & hg ref override.
From 56d2a4c494c491f938eeb9b1173a1dad3950058b Mon Sep 17 00:00:00 2001 From: John Sumsion <john@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@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
On Wed, Dec 7, 2011 at 6:28 PM, John Sumsion <john@sumsion.org> wrote:
From 56d2a4c494c491f938eeb9b1173a1dad3950058b Mon Sep 17 00:00:00 2001 From: John Sumsion <john@sumsion.org> Date: Sat, 3 Dec 2011 09:36:36 -0700 Subject: [PATCH 1/3] makepkg: Allowing for git & hg ref override. As an FYI, you don't need a period at the end of every subject.
Is this provoked by a bug report, or some sort of context here? Especially the choice of _gitref and _hgref- are these convention at this point or what? Documentation is essential for these types of patches, and unfortunately this patch contains none, which it definitely needs.
Signed-off-by: John Sumsion <john@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
participants (2)
-
Dan McGee
-
John Sumsion