2023-07-21 19:13:21 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd "$(dirname ${0})"
|
|
|
|
|
2023-09-16 04:53:52 +05:30
|
|
|
# You should update the version in package.json before running this script
|
|
|
|
FILE="gradio/package.json"
|
|
|
|
new_version=$(python -c "import json; f = open('$FILE', 'r'); data = json.load(f); print(data['version']); f.close();")
|
2023-09-18 21:06:09 -07:00
|
|
|
GRADIO_VERSION=$new_version
|
2023-07-21 19:13:21 +01:00
|
|
|
|
|
|
|
rm -rf gradio/templates/frontend
|
2023-08-24 10:22:28 -07:00
|
|
|
pnpm i --frozen-lockfile --ignore-scripts
|
2023-07-21 19:13:21 +01:00
|
|
|
GRADIO_VERSION=$new_version pnpm build
|
2023-11-02 22:29:03 +00:00
|
|
|
aws s3 cp gradio/templates/frontend "s3://gradio/${new_version}/" --recursive --region us-west-2
|
2023-07-21 19:13:21 +01:00
|
|
|
|
|
|
|
rm -rf dist/*
|
|
|
|
rm -rf build/*
|
|
|
|
python3 -m build
|