Gentoo Archives: gentoo-commits

From: Davide Pesavento <pesa@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qt:master commit in: Documentation/maintainers/
Date: Thu, 28 Nov 2019 19:31:13
Message-Id: 1574969394.2166c9f4473f729478cbea5665aaaab7d0a23e0c.pesa@gentoo
1 commit: 2166c9f4473f729478cbea5665aaaab7d0a23e0c
2 Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 28 19:29:54 2019 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 28 19:29:54 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=2166c9f4
7
8 Documentation/maintainers: remove obsolete script
9
10 Signed-off-by: Davide Pesavento <pesa <AT> gentoo.org>
11
12 Documentation/maintainers/bump-python-revisions | 184 ------------------------
13 1 file changed, 184 deletions(-)
14
15 diff --git a/Documentation/maintainers/bump-python-revisions b/Documentation/maintainers/bump-python-revisions
16 deleted file mode 100755
17 index 87c267b4..00000000
18 --- a/Documentation/maintainers/bump-python-revisions
19 +++ /dev/null
20 @@ -1,184 +0,0 @@
21 -#!/bin/bash
22 -
23 -set -e
24 -
25 -source /etc/init.d/functions.sh
26 -
27 -########################## VARIABLES ############################
28 -DATE="$(date +%F|sed 's/-//g')" # date to be added to ebuilds
29 -TARGET="dev.gentoo.org:~/public_html/distfiles/"
30 -TEMP="/tmp/qt-python-bump/"
31 -OVERLAY="$(portageq get_repo_path / qt)"
32 -QUIET=
33 -####################################################################
34 -
35 -usage() {
36 - echo """
37 -
38 -./bump-python-revisions
39 -
40 --h: Display this message
41 --q: Quiet mode. No questions. Just bump and commit
42 -
43 - """
44 -}
45 -
46 -dosip() {
47 - SIPKG="sip-${new_sip}" # Format Sip package
48 - ebegin "Downloading ${SIPKG} tarball..."
49 - wget -P ${TEMP} http://www.riverbankcomputing.co.uk/static/Downloads/sip4/${SIPKG}.tar.gz || exit 2
50 - eend $?
51 - ebegin "Copying ${SIPKG} to ${TARGET}"
52 - eend $?
53 - scp ${TEMP}/${SIPKG}.tar.gz ${TARGET} || exit
54 - cp ${TEMP}/${SIPKG}.tar.gz $(portageq envvar DISTDIR) || exit
55 - pushd ${OVERLAY}/dev-python/sip/
56 - tomove=$(find '.' -type f -name "sip-*_pre*.ebuild"|tail -1)
57 - einfo "Previous ebuild: ${tomove#./}"
58 - mv ${tomove#./} sip-${new_sip_ver}_pre${DATE}.ebuild || exit 1
59 - git rm ${tomove}
60 - ebegin "Changing revision number to: ${new_sip_rev}"
61 - sed -i -e "/HG_REVISION=/s:=.*:=${new_sip_rev}:" sip-${new_sip_ver}_pre${DATE}.ebuild
62 - eend $?
63 - repoman manifest || exit 1
64 - git add .
65 - popd
66 -}
67 -
68 -dopyqt4() {
69 - PYPKG="PyQt-x11-gpl-snapshot-${new_pyqt4}" #Format PyQt4 package
70 - ebegin "Downloading ${PYPKG} tarball..."
71 - wget -P ${TEMP} http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/${PYPKG}.tar.gz || exit 2
72 - eend $?
73 - einfo "Copying ${PYPKG} to ${TARGET} ..."
74 - scp ${TEMP}/${PYPKG}.tar.gz ${TARGET} || exit
75 - cp ${TEMP}/${PYPKG}.tar.gz $(portageq envvar DISTDIR) || exit
76 - pushd ${OVERLAY}/dev-python/PyQt4/
77 - tomove=$(find '.' -type f -name "PyQt4-*_pre*.ebuild"|tail -1)
78 - einfo "Previous ebuild: ${tomove#./}"
79 - mv ${tomove#./} PyQt4-${new_pyqt4_ver}_pre${DATE}.ebuild || exit 1
80 - git rm ${tomove}
81 - ebegin "Changing revision number to: ${new_pyqt4_rev}"
82 - sed -i "/^REVISION/s:=.*:=${new_pyqt4_rev}:" PyQt4-${new_pyqt4_ver}_pre${DATE}.ebuild
83 - eend $?
84 - repoman manifest || exit 1
85 - git add .
86 - popd
87 -}
88 -
89 -commit() {
90 - if [[ -z ${QUIET} ]]; then
91 - ewarn "Your changes are ready to be merged. However I strongly recommend you to review your changes."
92 - ewarn ""
93 - einfo "Press 'r' to review your changes or 'y' to merge them to master branch (default 'r')."
94 - read choice
95 - case "$choice" in
96 - y)
97 - ewarn "Your changes will be merged now. Don't break the overlay or I will shoot you down!"
98 - git commit -m "PyQt4/sip: Automated version bump, remove old" || exit 2
99 - git push || exit 2
100 - ;;
101 - r|"")
102 - git diff
103 - ;;
104 - *)
105 - eerror ""
106 - eerror "Invalid option. Are you stupid or something?"
107 - eerror ""
108 - exit 3
109 - esac
110 - else
111 - git commit -m "PyQt4/sip: Automated version bump, remove old" || exit 2
112 - git push || exit 2
113 - fi
114 -}
115 -
116 -getrevisions() {
117 - pushd ${OVERLAY}/dev-python/PyQt4/ > /dev/null
118 - pyqt4_tomove=$(find '.' -type f -name "PyQt4-*_pre*.ebuild"|tail -1)
119 - pyqt4_revision=$(grep ^REVISION ${pyqt4_tomove}|cut -d "=" -f 2)
120 - PVER=$(echo ${pyqt4_tomove/\.\//}|sed "s:PyQt4-\(.*\)_pre.*:\1:")
121 - popd > /dev/null
122 - pushd ${OVERLAY}/dev-python/sip/ > /dev/null
123 - sip_tomove=$(find '.' -type f -name "sip-*_pre*.ebuild"|tail -1)
124 - sip_revision=$(grep "HG_REVISION=" ${sip_tomove}|cut -d "=" -f 2)
125 - SVER=$(echo ${sip_tomove/\.\//}|sed "s:sip-\(.*\)_pre.*:\1:")
126 - popd > /dev/null
127 -
128 - einfo "Old Revisions:"
129 - einfo "PyQt4 : ${pyqt4_revision}"
130 - einfo "sip : ${sip_revision}"
131 -
132 - # Find new revisions
133 - new_pyqt4=$(curl -s \
134 - http://www.riverbankcomputing.com/software/pyqt/download \
135 - | grep "x11-gpl-snapshot-.*.tar.gz" \
136 - | cut -d '/' -f 5 | cut -d '-' -f 5-6 \
137 - | sed -e "s@\.tar\.gz.*@@")
138 - new_pyqt4_rev=$(echo $new_pyqt4 | cut -d '-' -f 2)
139 - new_pyqt4_ver=$(echo $new_pyqt4 | cut -d '-' -f 1)
140 - [[ -z ${new_pyqt4} ]] || \
141 - einfo "New PyQt4 snapshot@rev: ${new_pyqt4}@${new_pyqt4_rev}"
142 - new_sip=$(curl -s \
143 - http://www.riverbankcomputing.com/software/sip/download \
144 - | grep "snapshot-.*.tar.gz" \
145 - | cut -d '/' -f 5 | cut -d '-' -f 5-8 \
146 - | sed -e "s@\.tar\.gz.*@@")
147 - new_sip_rev=$(echo $new_sip | cut -d '-' -f 3)
148 - new_sip_ver=$(echo $new_sip | cut -d '-' -f 1)
149 - [[ -z ${new_sip} ]] || \
150 - einfo "New sip snapshot@rev: ${new_sip}@${new_sip_rev}"
151 - # Decide what to bump"
152 - [[ -z ${new_pyqt4_rev} ]] || \
153 - { [[ "${pyqt4_revision}" != "${new_pyqt4_rev}" ]] \
154 - && dopyqt4 && FOUND=true; }
155 - [[ -z ${new_sip_rev} ]] || \
156 - { [[ "${sip_revision}" != "${new_sip_rev}" ]] \
157 - && dosip && FOUND=true; }
158 -
159 - if [[ -n ${FOUND} ]]; then
160 - commit
161 - # clean up
162 - dst=$(portageq envvar DISTDIR)
163 - einfo "Cleaning up tarballs..."
164 - [[ -n ${SIPKG} ]] && rm ${TEMP}/${SIPKG}.tar.gz && rm ${dst}/${SIPKG}.tar.gz
165 - [[ -n ${PYPKG} ]] && rm ${TEMP}/${PYPKG}.tar.gz && rm ${dst}/${PYPKG}.tar.gz
166 - rm -r ${TEMP}
167 - else
168 - ewarn ""
169 - ewarn "No new snapshots. Sorry :-("
170 - ewarn ""
171 - fi
172 - exit 0
173 -
174 -}
175 -
176 -einfo """
177 - ###########################################################
178 - # Automatic PyQt4/sip bumping tool for qt overlay #
179 - # Author: Markos Chandras <hwoarang@g.o> #
180 - # Use ./bump-python-revisions -h for a usage example #
181 - ###########################################################
182 -"""
183 -
184 -ebegin "Updating tree"
185 -git pull
186 -eend $?
187 -
188 -while getopts ":hq" opt; do
189 - case $opt in
190 - h)
191 - usage
192 - exit 1
193 - ;;
194 - q)
195 - QUIET=1
196 - ;;
197 - ?)
198 - usage
199 - exit 1
200 - ;;
201 - esac
202 -done
203 -
204 -getrevisions