2024-04-09 09:48:32 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
test=false
|
|
|
|
version_bump="minor"
|
|
|
|
|
|
|
|
while getopts ":b:t" opt; do
|
|
|
|
case ${opt} in
|
|
|
|
b )
|
|
|
|
version_bump=$OPTARG
|
|
|
|
;;
|
|
|
|
t )
|
|
|
|
test=true
|
|
|
|
;;
|
|
|
|
\? )
|
|
|
|
echo "Invalid option: $OPTARG" 1>&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
: )
|
|
|
|
echo "Invalid option: $OPTARG requires an argument" 1>&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
shift $((OPTIND -1))
|
|
|
|
|
|
|
|
# install dev dependencies
|
|
|
|
echo "installing dev dependencies..."
|
2024-04-10 11:47:35 +00:00
|
|
|
python3 -m pip install -r requirements-dev.txt
|
2024-04-09 09:48:32 +00:00
|
|
|
|
2024-04-10 11:47:35 +00:00
|
|
|
# hatch version ${version_bump}
|
|
|
|
# git add "music_kraken/__init__.py"
|
|
|
|
# git commit -m "bump: ${version_bump}"
|
2024-04-09 09:48:32 +00:00
|
|
|
|
|
|
|
# build the wheels
|
|
|
|
python3 -m build
|
|
|
|
|
|
|
|
# install the newest version
|
2024-04-11 11:53:02 +00:00
|
|
|
# python3 -m pip install .
|
2024-04-09 09:48:32 +00:00
|
|
|
|
|
|
|
if [ "$test" = true ];
|
|
|
|
then
|
|
|
|
echo "just a test"
|
|
|
|
twine upload --repository testpypi dist/music_kraken*
|
|
|
|
python3 -m pip install -i https://test.pypi.org/simple/ music-kraken -U
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2024-04-15 18:44:19 +00:00
|
|
|
twine upload dist/music_kraken*
|