27 lines
694 B
Bash
Executable file
27 lines
694 B
Bash
Executable file
#!/bin/bash
|
|
|
|
baddeps=""
|
|
# check deps
|
|
python3 -m build.__init__ || baddeps="python3-build"
|
|
rpm -q twine || baddeps="${baddeps} twine"
|
|
if [ -n "${baddeps}" ]; then
|
|
echo "${baddeps} must be installed!"
|
|
exit 1
|
|
fi
|
|
|
|
if [ "$#" != "1" ]; then
|
|
echo "Must pass release version!"
|
|
exit 1
|
|
fi
|
|
|
|
version=$1
|
|
name=rmdepcheck
|
|
sed -i -e "s,version = \".*\",version = \"${version}\", g" pyproject.toml
|
|
sed -i -e "s,__version__ = \".*\",__version__ = \"${version}\", g" ${name}.py
|
|
git add pyproject.toml ${name}.py
|
|
git commit -s -m "Release ${version}"
|
|
git push
|
|
git tag -a -m "Release ${version}" ${version}
|
|
git push origin ${version}
|
|
python3 -m build .
|
|
twine upload -r pypi dist/${name}-${version}*
|