mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
32 lines
691 B
Bash
Executable File
32 lines
691 B
Bash
Executable File
#!/bin/bash
|
|
|
|
git pull origin master
|
|
|
|
old_version=$(grep -Po "(?<=version=')[^']+(?=')" setup.py)
|
|
echo "Current version is $old_version. New version?"
|
|
read new_version
|
|
sed -i "s/version='$old_version'/version='$new_version'/g" setup.py
|
|
|
|
read -p "npm build? " -n 1 -r
|
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
|
then
|
|
cd frontend
|
|
npm run build
|
|
cd ..
|
|
fi
|
|
|
|
read -p "frontend updates? " -n 1 -r
|
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
|
then
|
|
aws s3 cp gradio/frontend s3://gradio/$new_version/ --recursive
|
|
echo $new_version > gradio/version.txt
|
|
fi
|
|
|
|
rm -r dist/*
|
|
rm -r build/*
|
|
python setup.py sdist bdist_wheel
|
|
python -m twine upload dist/*
|
|
git add -A
|
|
git commit -m "updated PyPi version"
|
|
git push origin master
|