| 
     1 #!/bin/bash
    2 
    3 case $1 in
    4     v*-dts) ;;
    5     '')
    6         echo >&2 "No version given"
    7         exit 1
    8         ;;
    9     *)
   10         echo >&2 "Unexpected version: $1"
   11         exit 1
   12         ;;
   13 esac
   14 
   15 v=$1
   16 
   17 set -e
   18 
   19 # Use the date of Linus' originally tagged commit for the merge. This might
   20 # differ from what the commit that the rewritten tag points to, since the
   21 # orignal commit may have been discarded.
   22 export GIT_AUTHOR_DATE=$(git log -1 --format=%ad "${v%-dts}")
   23 if [ ! "${GIT_AUTHOR_DATE}" ] ; then
   24     echo >&2 "Unable to determine commit date for merge"
   25     exit 1
   26 fi
   27 if [ "${v}" = "v2.6.12-rc2-dts" ] ; then
   28     auh="--allow-unrelated-histories"
   29 fi
   30 git merge $auh --no-edit "${v}-raw"
   31 git clean -fdqx
   32 # Use the date of Linus' original tag for the tag.
   33 case "${v%-dts}" in
   34     v2.6.12*|v2.6.13-rc[123])
   35         # Commits from v2.6.12-rc2..v2.6.13-rc3 lacked the date. So use the commit's
   36         # date.
   37         export GIT_COMMITTER_DATE="${GIT_AUTHOR_DATE}"
   38         ;;
   39     *)
   40         export GIT_COMMITTER_DATE="$(git for-each-ref --format='%(taggerdate)' "refs/tags/${v%-dts}")"
   41         ;;
   42 esac
   43 if [ ! "${GIT_COMMITTER_DATE}" ] ; then
   44     echo >&2 "Unable to determine date for tag"
   45     exit 1
   46 fi
   47 git tag -s -m "Tagging ${v}" -u 695A46C6 "${v}"
   48 make -k -j12 -s
Cache object: 8fc704bae7f38dd3ec9115da27a5c969 
 
 |