fix: support PKCE public client without client secret
Deploy EG-BIM QA Gateway / deploy (push) Successful in 48s
Deploy EG-BIM QA Gateway / deploy (push) Successful in 48s
This commit is contained in:
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
bucket="${1:-baron-qa-pages}"
|
||||
|
||||
upload() {
|
||||
local file="$1"
|
||||
local key="$2"
|
||||
local content_type="$3"
|
||||
npx wrangler r2 object put "$bucket/$key" --file "$file" --content-type "$content_type" --remote
|
||||
}
|
||||
|
||||
upload index.html index.html text/html
|
||||
upload write.html write.html text/html
|
||||
upload detail.html detail.html text/html
|
||||
upload app.js app.js application/javascript
|
||||
upload index.html egbim/index.html text/html
|
||||
upload write.html egbim/write.html text/html
|
||||
upload detail.html egbim/detail.html text/html
|
||||
upload app.js egbim/app.js application/javascript
|
||||
|
||||
while IFS= read -r file; do
|
||||
key="${file#./}"
|
||||
case "$file" in
|
||||
*.css) content_type="text/css" ;;
|
||||
*.js) content_type="application/javascript" ;;
|
||||
*.woff2) content_type="font/woff2" ;;
|
||||
*.svg) content_type="image/svg+xml" ;;
|
||||
*.png) content_type="image/png" ;;
|
||||
*.jpg|*.jpeg) content_type="image/jpeg" ;;
|
||||
*) content_type="application/octet-stream" ;;
|
||||
esac
|
||||
upload "$file" "$key" "$content_type"
|
||||
upload "$file" "egbim/$key" "$content_type"
|
||||
done < <(find ./assets -type f -not -name '*.map' -print | sort)
|
||||
|
||||
echo "Uploaded static files to R2 bucket: $bucket"
|
||||
Reference in New Issue
Block a user