gradio/scripts/gh_action_pypi.sh
Ofek Lev f43481c18a
Update package metadata (#2226)
* Update package metadata

* address review
2022-09-14 17:39:46 -04:00

26 lines
587 B
Bash
Executable File

#!/bin/bash
cd "$(dirname ${0})/.."
source scripts/helpers.sh
pnpm_required
aws_required
# You should update the version in version.txt before running this script
new_version="$(cat gradio/version.txt)"
GRADIO_VERSION=$new_version
rm -rf gradio/templates/frontend
rm -rf gradio/templates/cdn
cd ui
pnpm i
GRADIO_VERSION=$new_version pnpm build
GRADIO_VERSION=$new_version pnpm build:cdn
cd ..
aws s3 cp gradio/templates/cdn "s3://gradio/${new_version}/" --recursive
cp gradio/templates/cdn/index.html gradio/templates/frontend/share.html
rm -r dist/*
rm -r build/*
python3 -m build