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
|
2021-10-19 21:56:46 +00:00
|
|
|
cd assets && npm i && cd ..
|
2021-08-19 15:48:06 +00:00
|
|
|
fi
|
|
|
|
|
2021-10-19 21:56:46 +00:00
|
|
|
mix assets.deploy && \
|
2021-10-18 09:07:26 +00:00
|
|
|
mix release --overwrite && \
|
2021-09-13 19:53:22 +00:00
|
|
|
cd _build/android_prod/rel/todo_app && \
|
2021-09-16 12:49:43 +00:00
|
|
|
zip -0r $BASE/src/main/assets/app.zip lib/ releases/ --exclude "*.so" && \
|
|
|
|
xz -9ef $BASE/src/main/assets/app.zip
|
2021-08-19 15:48:06 +00:00
|
|
|
|