41 lines
867 B
Bash
Executable File
41 lines
867 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
set -x
|
|
|
|
version=$1
|
|
[ ! "$version"] && version=$(python setup.py --version | sed 's/\.dev.*//')
|
|
|
|
status=$(git status -sz)
|
|
[ -z "$status" ] || false
|
|
git checkout master
|
|
tox -epy35,py27,pep8,docs
|
|
git push
|
|
git tag -s $version -m "Release version ${version}"
|
|
git checkout $version
|
|
git clean -fd
|
|
pbr_version=$(python setup.py --version)
|
|
if [ "$version" != "$pbr_version" ]; then
|
|
echo "something goes wrong pbr version is different from the provided one. ($pbr_version != $version)"
|
|
exit 1
|
|
fi
|
|
python setup.py sdist bdist_wheel
|
|
|
|
set +x
|
|
echo
|
|
echo "release: jsonpath-rw-ext ${version}"
|
|
echo
|
|
echo "SHA1sum: "
|
|
sha1sum dist/*
|
|
echo "MD5sum: "
|
|
md5sum dist/*
|
|
echo
|
|
echo "uploading..."
|
|
echo
|
|
set -x
|
|
|
|
read
|
|
git push --tags
|
|
twine upload -r pypi -s dist/jsonpath-rw-ext-${version}.tar.gz dist/jsonpath_rw_ext-${version}-py2.py3-none-any.whl
|
|
git checkout master
|