/[linux-patches]/genpatches-2.6-misc/scripts/gpdorelease
Gentoo

Contents of /genpatches-2.6-misc/scripts/gpdorelease

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1945 - (show annotations) (download)
Tue Jul 12 21:02:38 2011 UTC (3 years, 9 months ago) by mpagano
File size: 2442 byte(s)
Support Linux 3.0 version
1 #!/bin/bash
2
3 #updated for 3.0
4
5 function usage {
6 echo ">>> USAGE: gpdorelease <version>"
7 echo "This will expand to ${LOCAL_PATCHES_TRUNK}/<version>"
8 echo "To support the 3.0 release of Linux, this script now requires the full kernel version"
9 echo "Example: gpdorelease 3.0 or gpdorelease 2.6.39"
10 }
11
12 if [[ ${#@} == 0 ]] ; then
13 usage
14 exit -1
15 fi
16
17 if [[ ${1} == "--config" ]] ; then
18 echo "Sourcing ${2} instead of ~/.genpatchesrc"
19 source ${2}
20 shift 2
21 if [[ ${#@} == 0 ]] ; then
22 usage
23 exit -1
24 fi
25 else
26 echo "Using default config at ~/.genpatchesrc"
27 source ~/.genpatchesrc
28 fi
29
30 BRANCH="$1"
31
32 if [[ $(svn status ${LOCAL_PATCHES_TRUNK} | wc -l) != "0" ]] ; then
33 echo ">>> ERROR: There are uncommited changes in ${LOCAL_PATCHES_TRUNK}"
34 exit -1
35 fi
36
37 EXISTING_TAGS="$(svn ls ${REMOTE_TAGS})"
38
39 lastver=0
40 for i in $EXISTING_TAGS ; do
41 tag="${i%/}"
42 if [[ ${tag/-*} == $BRANCH && ${tag#*-} -gt $lastver ]] ; then
43 lastrelease="${tag}"
44 lastver="${tag#*-}"
45 fi
46 done
47
48 if [[ -z $lastrelease ]] ; then
49 newrel="1"
50 else
51 newrel="${lastrelease#${BRANCH}-}"
52 (( newrel++ ))
53 fi
54
55 newfullver="${BRANCH}-${newrel}"
56
57 echo "I will now:"
58 echo "1. Tag the ${BRANCH} branch as ${newfullver} (immediate commit)"
59 echo "2. Produce genpatches-${newfullver} tarballs"
60 echo "3. Upload tarballs to distfiles-local"
61 echo "4. (Optionally) create and upload website"
62 echo "5. (Optionally) send a release announcement to gentoo-kernel"
63 echo
64 echo "Make sure everything is already committed and ready to roll."
65 echo "Press enter to continue."
66
67 read
68
69 svn copy ${REMOTE_TRUNK}/${BRANCH} ${REMOTE_TAGS}/${newfullver} -m "${newfullver} release"
70
71 file_base="/tmp/${TARBALL_BASENAME}-$newfullver.base.tar.bz2"
72 file_extras="/tmp/${TARBALL_BASENAME}-$newfullver.extras.tar.bz2"
73 dir="${BRANCH}"
74 cd ${LOCAL_PATCHES_TRUNK}
75
76 if [[ "${WE_WANT}" == "base extras" ]] ; then
77 [ -n "$(find ${dir}/[012]* 2>/dev/null)" ] && tar -cvjf ${file_base} ${dir}/[012]*
78 [ -n "$(find ${dir}/[34]* 2>/dev/null)" ] && tar -cvjf ${file_extras} ${dir}/[34]*
79 elif [[ "${WE_WANT}" == "extras" ]] ; then
80 [ -n "$(find ${dir}/[34]* 2>/dev/null)" ] && tar -cvjf ${file_extras} ${dir}/[34]*
81 fi
82
83 scp /tmp/${TARBALL_BASENAME}-$newfullver.* ${USERNAME}@dev.gentoo.org:/space/distfiles-local
84
85 if [[ ${DO_WEBSITE} == "yes" ]] ; then
86 mv ${file_base} ${file_extras} ${WEB_LOCAL}/tarballs/
87 gpdoweb
88 fi
89
90 [[ ${DO_EMAIL_ANNOUNCEMENT} == "yes" ]] && gpdoemail $newfullver $KERNEL_NAME

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20