Skip to content

Commit cf527e1

Browse files
committed
Prepare for 2.4.1
1 parent 2fdc4fe commit cf527e1

File tree

3 files changed

+72
-4
lines changed

3 files changed

+72
-4
lines changed

HISTORY.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
History
44
-------
55

6-
2.4.1 (2016-XX-XX)
6+
2.4.1 (2016-11-21)
77
++++++++++++++++++
88

99
* Updated documentation to clarify what the accuracy radius refers to.
10+
* Fixed classifiers in ``setup.py``.
1011

1112
2.4.0 (2016-06-10)
1213
++++++++++++++++++

dev-bin/release.sh

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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" geoip2/__init__.py
37+
38+
echo $"Test results:"
39+
python setup.py test
40+
41+
echo $'\nDiff:'
42+
git diff
43+
44+
echo $'\nRelease 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

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
include_package_data=True,
2727
install_requires=requirements,
2828
extras_require={
29-
':python_version=="2.6" or python_version=="2.7"': ['ipaddress']},
29+
':python_version=="2.6" or python_version=="2.7"': ['ipaddress']
30+
},
3031
tests_require=['requests_mock'],
3132
test_suite="tests",
3233
license=geoip2.__license__,
@@ -41,8 +42,8 @@
4142
'Programming Language :: Python :: 3',
4243
'Programming Language :: Python :: 3.3',
4344
'Programming Language :: Python :: 3.4',
45+
'Programming Language :: Python :: 3.5',
4446
'Programming Language :: Python',
4547
'Topic :: Internet :: Proxy Servers',
4648
'Topic :: Internet',
47-
],
48-
)
49+
], )

0 commit comments

Comments
 (0)