2022-06-10 15:29:29 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-08-02 06:17:03 +08:00
|
|
|
cd "$(dirname ${0})/.."
|
|
|
|
source scripts/helpers.sh
|
2022-06-10 15:29:29 +08:00
|
|
|
|
2022-08-02 06:17:03 +08:00
|
|
|
pnpm_required
|
|
|
|
aws_required
|
2022-06-10 15:29:29 +08:00
|
|
|
|
2022-09-07 04:49:49 +08:00
|
|
|
# You should update the version in version.txt before running this script
|
2022-08-02 06:17:03 +08:00
|
|
|
new_version="$(cat gradio/version.txt)"
|
2022-08-02 23:17:47 +08:00
|
|
|
GRADIO_VERSION=$new_version
|
2022-08-02 06:17:03 +08:00
|
|
|
|
|
|
|
rm -rf gradio/templates/frontend
|
|
|
|
rm -rf gradio/templates/cdn
|
|
|
|
cd ui
|
|
|
|
pnpm i
|
2022-08-02 23:23:37 +08:00
|
|
|
GRADIO_VERSION=$new_version pnpm build
|
|
|
|
GRADIO_VERSION=$new_version pnpm build:cdn
|
2022-08-02 06:17:03 +08:00
|
|
|
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/*
|
2022-09-15 05:39:46 +08:00
|
|
|
python3 -m build
|