Mercurial > hg > aboriginal
changeset 767:dc19e20734ca
Use the git magic tarball comment field to get the version number of unstable git packages for MANIFEST.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 30 Jun 2009 03:05:04 -0500 |
parents | 3d5fdc78af90 |
children | 27f007ea2129 |
files | sources/functions.sh |
diffstat | 1 files changed, 16 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/sources/functions.sh Mon Jun 29 18:34:35 2009 -0500 +++ b/sources/functions.sh Tue Jun 30 03:05:04 2009 -0500 @@ -451,6 +451,22 @@ { if unstable "$1" then + for i in "b" "" + do + FILE="$(echo "$SRCDIR/alt-$1-"*.tar.$i*)" + if [ -f "$FILE" ] + then + GITID="$(${i}zcat "$FILE" | git get-tar-commit-id)" + if [ ! -z "$GITID" ] + then + # The first dozen chars should form a unique id. + + echo $GITID | sed 's/^\(................\).*/git \1/' + return + fi + fi + done + # Need to extract unstable packages to determine source control version. EXTRACT_ONLY=1 setupfor "$1" >&2 @@ -468,13 +484,6 @@ $(hg tip | sed -n 's/changeset: *\([0-9]*\).*/\1/p') ) return 0 - elif [ -d "$DIR/.git" ] - then - ( echo git rev \ - $(git show master --pretty=format:%H | - sed -n '1s/^\(............\).*/\1/p') - ) - return 0 fi fi