File tree Expand file tree Collapse file tree 2 files changed +71
-0
lines changed
Expand file tree Collapse file tree 2 files changed +71
-0
lines changed Original file line number Diff line number Diff line change 33 History
44-------
55
6+ 1.2.2 (2016-11-21)
7+ ++++++++++++++++++
8+
9+ * Fix to the classifiers in ``setup.py ``. No code changes.
10+
6111.2.1 (2016-06-10)
712++++++++++++++++++
813
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -eu -o pipefail
4+
5+ changelog=$( cat HISTORY.rst)
6+
7+ regex='
8+ ([0-9]+\.[0-9]+\.[0-9]+) \(([0-9]{4}-[0-9]{2}-[0-9]{2})\)
9+ \+*
10+
11+ ((.|
12+ )*)
13+ '
14+
15+ if [[ ! $changelog =~ $regex ]]; then
16+ echo " Could not find date line in change log!"
17+ exit 1
18+ fi
19+
20+ version=" ${BASH_REMATCH[1]} "
21+ date=" ${BASH_REMATCH[2]} "
22+ notes=" $( echo " ${BASH_REMATCH[3]} " | sed -n -e ' /^[0-9]\+\.[0-9]\+\.[0-9]\+/,$!p' ) "
23+
24+ if [[ " $date " -ne $( date +" %Y-%m-%d" ) ]]; then
25+ echo " $date is not today!"
26+ exit 1
27+ fi
28+
29+ tag=" v$version "
30+
31+ if [ -n " $( git status --porcelain) " ]; then
32+ echo " . is not clean." >&2
33+ exit 1
34+ fi
35+
36+ perl -pi -e " s/(?<=__version__ = ').+?(?=')/$version /gsm" maxminddb/__init__.py
37+
38+ echo $" Test results:"
39+ python setup.py test
40+
41+ echo $' \n Diff:'
42+ git diff
43+
44+ echo $' \n Release notes:'
45+ echo " $notes "
46+
47+ read -e -p " Commit changes and push to origin? " should_push
48+
49+ if [ " $should_push " != " y" ]; then
50+ echo " Aborting"
51+ exit 1
52+ fi
53+
54+ git commit -m " Update for $tag " -a
55+
56+ git push
57+
58+ message=" $version
59+
60+ $notes "
61+
62+ hub release create -m " $message " " $tag "
63+
64+ git push --tags
65+
66+ python setup.py release
You can’t perform that action at this time.
0 commit comments