forked from mgckind/easyaccess
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrelease.sh
executable file
·55 lines (46 loc) · 1.62 KB
/
release.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
51
52
53
54
55
#!/bin/bash
VERSION=$1
if [[ "${VERSION}x" == "x" ]]; then
echo "Specify version number"
exit 1
fi
echo "+-----------------------------------------------------------+"
echo 'Did you update "CHANGES.md"?'; echo
if grep $VERSION CHANGES.md ; then
echo; echo "It looks like you did."; echo;
else
echo; echo "It looks like you did not."; echo;
exit 1
fi
echo
echo "+-----------------------------------------------------------+"
echo 'Did you update "config/conda/meta.yaml"?'; echo
search1=$(grep "version: \"${VERSION}\"" config/conda/meta.yaml)
search2=$(grep "git_rev: ${VERSION}" config/conda/meta.yaml)
if [[ $search1 && $search2 ]]; then
echo; echo "It looks like you did."; echo;
else
echo; echo "It looks like you did not."; echo;
exit 1
fi
echo "+-----------------------------------------------------------+"
echo 'Did you update "easyaccess/version.py"?'; echo
if grep "version_tag = ($(echo $VERSION | sed 's/\./, /g'))" easyaccess/version.py ; then
echo; echo "It looks like you did."; echo;
else
echo; echo "It looks like you did not."; echo;
exit 1
fi
echo "+-----------------------------------------------------------+"
echo 'Did you build the PyPi package?'; echo
if find dist/ | grep $VERSION ; then
echo; echo "It looks like you did."; echo;
else
echo; echo "It looks like you did not."; echo;
python3 setup.py sdist
python3 setup.py bdist_wheel --universal
echo
echo "You need to manually execute the following to upload:"; echo
echo " twine upload \"dist/easyaccess-${VERSION}-py2.py3-none-any.whl\" \"dist/easyaccess-${VERSION}.tar.gz\""; echo
exit 1
fi