about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorhailey <me@haileyok.com>2025-06-18 12:46:24 -0700
committerGitHub <noreply@github.com>2025-06-18 12:46:24 -0700
commitf36776a91e27913dea66a99903c58df165c7b7fc (patch)
treee4a2d0d8cac87942ed4f5db6a7439d39b65c150a /scripts
parenteb18b6a49a702d67c5b46de3d7e62536ff02b620 (diff)
downloadvoidsky-f36776a91e27913dea66a99903c58df165c7b7fc.tar.zst
switch mmkv version before android eas bundle (#8526)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bundleUpdate.js26
1 files changed, 17 insertions, 9 deletions
diff --git a/scripts/bundleUpdate.js b/scripts/bundleUpdate.js
index 00217dcd7..a5f1fb641 100644
--- a/scripts/bundleUpdate.js
+++ b/scripts/bundleUpdate.js
@@ -3,17 +3,25 @@ const fs = require('fs')
 const fsp = fs.promises
 const path = require('path')
 
-const DIST_DIR = './dist'
+const IOS_DIST_DIR = './ios-dist'
+const ANDROID_DIST_DIR = './android-dist'
+
 const BUNDLES_DIR = '/_expo/static/js'
-const IOS_BUNDLE_DIR = path.join(DIST_DIR, BUNDLES_DIR, '/ios')
-const ANDROID_BUNDLE_DIR = path.join(DIST_DIR, BUNDLES_DIR, '/android')
-const METADATA_PATH = path.join(DIST_DIR, '/metadata.json')
+
+const IOS_BUNDLE_DIR = path.join(IOS_DIST_DIR, BUNDLES_DIR, '/ios')
+const ANDROID_BUNDLE_DIR = path.join(ANDROID_DIST_DIR, BUNDLES_DIR, '/android')
+
+const IOS_METADATA_PATH = path.join(IOS_DIST_DIR, '/metadata.json')
+const ANDROID_METADATA_PATH = path.join(ANDROID_DIST_DIR, '/metadata.json')
+
 const DEST_DIR = './bundleTempDir'
 
 // Weird, don't feel like figuring out _why_ it wants this
-const METADATA = require(`../${METADATA_PATH}`)
-const IOS_METADATA_ASSETS = METADATA.fileMetadata.ios.assets
-const ANDROID_METADATA_ASSETS = METADATA.fileMetadata.android.assets
+const IOS_METADATA = require(`../${IOS_METADATA_PATH}`)
+const ANDROID_METADATA = require(`../${ANDROID_METADATA_PATH}`)
+
+const IOS_METADATA_ASSETS = IOS_METADATA.fileMetadata.ios.assets
+const ANDROID_METADATA_ASSETS = ANDROID_METADATA.fileMetadata.android.assets
 
 const getMd5 = async path => {
   return new Promise(res => {
@@ -60,7 +68,7 @@ const moveFiles = async () => {
 
   console.log('Getting ios asset md5s and moving them...')
   for (const asset of IOS_METADATA_ASSETS) {
-    const currPath = path.join(DIST_DIR, asset.path)
+    const currPath = path.join(IOS_DIST_DIR, asset.path)
     const md5 = await getMd5(currPath)
     const withExtPath = `assets/${md5}.${asset.ext}`
     iosAssets.push(withExtPath)
@@ -69,7 +77,7 @@ const moveFiles = async () => {
 
   console.log('Getting android asset md5s and moving them...')
   for (const asset of ANDROID_METADATA_ASSETS) {
-    const currPath = path.join(DIST_DIR, asset.path)
+    const currPath = path.join(ANDROID_DIST_DIR, asset.path)
     const md5 = await getMd5(currPath)
     const withExtPath = `assets/${md5}.${asset.ext}`
     androidAssets.push(withExtPath)