Skip to content

Commit 4c70266

Browse files
committed
Fix deployment script sed compatibility and suppress web-sys warnings
1 parent 4f6bc44 commit 4c70266

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

scripts/build-web.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ if [ -n "$WORKER_FILE" ]; then
3939
echo "📁 Found worker file: $WORKER_FILE"
4040

4141
# Fix the import path from '../../..' to '../../../evo.js'
42-
sed -i '' 's/await import('\''\.\.\/\.\.\/\.\.'\'');/await import('\''\.\.\/\.\.\/\.\.\/evo\.js'\'');/g' "$WORKER_FILE"
42+
sed -i.bak 's/await import('\''\.\.\/\.\.\/\.\.'\'');/await import('\''\.\.\/\.\.\/\.\.\/evo\.js'\'');/g' "$WORKER_FILE"
43+
rm "${WORKER_FILE}.bak"
4344

4445
if [ $? -eq 0 ]; then
4546
echo "✅ Worker import path fixed successfully"
@@ -62,7 +63,8 @@ if [ -n "$WEB_WORKER_FILE" ]; then
6263
echo "📁 Found web worker file: $WEB_WORKER_FILE"
6364

6465
# Fix the import path from '../../..' to '../../../evo.js'
65-
sed -i '' 's/await import('\''\.\.\/\.\.\/\.\.'\'');/await import('\''\.\.\/\.\.\/\.\.\/evo\.js'\'');/g' "$WEB_WORKER_FILE"
66+
sed -i.bak 's/await import('\''\.\.\/\.\.\/\.\.'\'');/await import('\''\.\.\/\.\.\/\.\.\/evo\.js'\'');/g' "$WEB_WORKER_FILE"
67+
rm "${WEB_WORKER_FILE}.bak"
6668

6769
if [ $? -eq 0 ]; then
6870
echo "✅ Web worker import path fixed successfully"
@@ -76,11 +78,13 @@ fi
7678

7779
# Update cache busting version in app.js
7880
echo "🔄 Updating cache busting version in app.js..."
79-
sed -i '' "s/from \"\.\.\/pkg\/evo\.js?v=[0-9]*\"/from \"..\/pkg\/evo.js?v=$CACHE_VERSION\"/g" web/js/app.js
81+
sed -i.bak "s/from \"\.\.\/pkg\/evo\.js?v=[0-9]*\"/from \"..\/pkg\/evo.js?v=$CACHE_VERSION\"/g" web/js/app.js
82+
rm web/js/app.js.bak
8083

8184
# Update cache busting version in index.html
8285
echo "🔄 Updating cache busting version in index.html..."
83-
sed -i '' "s/src=\"js\/app\.js?v=[0-9]*\"/src=\"js\/app.js?v=$CACHE_VERSION\"/g" web/index.html
86+
sed -i.bak "s/src=\"js\/app\.js?v=[0-9]*\"/src=\"js\/app.js?v=$CACHE_VERSION\"/g" web/index.html
87+
rm web/index.html.bak
8488

8589
# Verify the build
8690
echo "🔍 Verifying build..."

src/web/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ impl WebRenderer {
4141
Ok(WebRenderer { ctx, width, height })
4242
}
4343

44+
#[allow(deprecated)]
4445
pub fn render(&self, entities: &JsValue) -> Result<(), JsValue> {
4546
// Parse entities from JS
4647
let entities: Vec<EntityData> = serde_wasm_bindgen::from_value(entities.clone())?;

0 commit comments

Comments
 (0)