Skip to content

Fix mobile asset build not using prod env (Android, iOS)

Eric Eastwood requested to merge fix-android-assets-not-using-prod into develop

Fix mobile asset build not using prod env (Android, iOS)

The code already tried to default to prod if process.env.NODE_ENV was undefined but @gitterhq/env defaults it to dev so we can't rely on undefined, https://gitlab.com/gitlab-org/gitter/env/blob/0729b4b89308b6debe677279f273d6bbc406eba9/lib/config.js#L8

I thought I was running into https://gitlab.com/gitlab-org/gitter/gitter-android-app/issues/108 again but looks to be a different cause.

I'm not sure how this was working previously 🤔


npm run gulp -- embedded:compile:markup --gulpfile gulpfile-embedded.js --android

I was also seeing this blank problem on the latest build (currently on beta), https://gitlab.com/gitlab-org/gitter/gitter-android-app/pipelines/56754103

But was able to fix it after I built the assets with the prod environment. You can check window.gitterClientEnv in output/android/www/mobile/embedded-chat.html if it is using localhost:5000 vs gitter.im

https://gitlab.com/gitlab-org/gitter/gitter-android-app/issues/108

Edited by Eric Eastwood

Merge request reports

Loading