2021-08-19 15:48:06 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
BASE=`pwd`
|
|
|
|
export MIX_ENV=prod
|
|
|
|
export MIX_TARGET=android
|
|
|
|
|
|
|
|
if [ ! -d "elixir-app" ]; then
|
|
|
|
git clone https://github.com/elixir-desktop/desktop-example-app.git elixir-app
|
|
|
|
cd elixir-app
|
|
|
|
mix deps.get
|
|
|
|
else
|
|
|
|
cd elixir-app
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "assets/node_modules" ]; then
|
|
|
|
cd assets && npm i && npm run deploy && cd .. && mix phx.digest
|
|
|
|
fi
|
|
|
|
|
|
|
|
mix release --overwrite && \
|
2021-09-13 19:53:22 +00:00
|
|
|
cd _build/android_prod/rel/todo_app && \
|
2021-08-19 15:48:06 +00:00
|
|
|
zip -r $BASE/src/main/assets/app.zip lib/ releases/ --exclude "*.so"
|
|
|
|
|