mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
37c8ee3974
* add static src to modify sketch * add themes * update all tooling to use the new frontend dir * revert formatting * update template index * fix formatting * fix scripts for new ui folder * remoce console.logs * remoce console.logs * ensure dataeries clear works correctly * ensure label chart has correct width * remove cropper when component is destroyed * update tailwind * remove console logs * fix formatting Co-authored-by: Ali Abid <aliabid94@gmail.com>
31 lines
836 B
Bash
Executable File
31 lines
836 B
Bash
Executable File
#!/bin/bash
|
|
if [ -z "$(ls | grep CONTRIBUTING.md)" ]; then
|
|
echo "Please run the script from repo directory"
|
|
exit -1
|
|
else
|
|
echo "Uploading to pypi"
|
|
set -e
|
|
git pull origin master
|
|
old_version=$(ggrep -Po "(?<=version=\")[^\"]+(?=\")" setup.py)
|
|
echo "Current version is $old_version. New version?"
|
|
read new_version
|
|
gsed -i "s/version=\"$old_version\"/version=\"$new_version\"/g" setup.py
|
|
read -p "frontend updates? " -r
|
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
|
then
|
|
echo -n $new_version > gradio/version.txt
|
|
cd ui
|
|
npm run build
|
|
cd ..
|
|
aws s3 cp gradio/templates/frontend s3://gradio/$new_version/ --recursive
|
|
fi
|
|
rm -r dist/*
|
|
rm -r build/*
|
|
python3 setup.py sdist bdist_wheel
|
|
python3 -m twine upload dist/*
|
|
git add -A
|
|
git commit -m "updated PyPi version to $new_version"
|
|
git push origin master
|
|
fi
|
|
|