forked from fastavro/fastavro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.sh
executable file
·50 lines (39 loc) · 1.22 KB
/
publish.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
# Push to pypi, tag and push to bitbucket
ver=$(python setup.py --version)
# Fail on 1'st error
set -e
set -x
# Make sure we have made the tag
if git rev-parse $ver >/dev/null 2>&1; then
true # Tag found
else
echo "$ver git tag not found. Make sure you run 'make tag' first"
exit 1
fi
OSes="win_amd64
win32
macosx_10_14_x86_64
manylinux2010_x86_64"
PyVers="27
35
36
37"
for os in $OSes; do
for pyver in $PyVers; do
wget -q --directory-prefix=dist/ https://github.com/fastavro/fastavro/releases/download/${ver}/fastavro-${ver}-cp${pyver}-cp${pyver}m-${os}.whl
done
done
# Get the 38 versions
for os in $OSes; do
wget -q --directory-prefix=dist/ https://github.com/fastavro/fastavro/releases/download/${ver}/fastavro-${ver}-cp38-cp38-${os}.whl
done
# Also get the linux 2.7mu version
wget -q --directory-prefix=dist/ https://github.com/fastavro/fastavro/releases/download/${ver}/fastavro-${ver}-cp27-cp27mu-manylinux2010_x86_64.whl
make fresh
FASTAVRO_USE_CYTHON=1 python setup.py sdist
twine upload dist/fastavro-${ver}.tar.gz
twine upload dist/fastavro-${ver}*.whl
# print sha so we can use it in conda-forge recipe
sha256sum dist/fastavro-${ver}.tar.gz
rm -fr build dist/* fastavro.egg-info/