build: add simple script for building for android

Closes #100
This commit is contained in:
Jovan Krunić
2021-04-19 22:10:11 +02:00
parent 3da7c7d009
commit 1d94dd5bf3
2 changed files with 9 additions and 1 deletions

View File

@@ -69,6 +69,12 @@ Build the app (transpile etc.):
npm run build npm run build
``` ```
Build the app for testing on an android device:
```
npm run docker:build:android
```
Open the app in the browser: Open the app in the browser:
``` ```
ionic serve ionic serve

View File

@@ -20,6 +20,7 @@
"check-configuration": "openstapps-configuration", "check-configuration": "openstapps-configuration",
"e2e": "LANGUAGE=de-DE ng e2e --no-webdriver-update", "e2e": "LANGUAGE=de-DE ng e2e --no-webdriver-update",
"docker:build": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"npm install && npm run build\"", "docker:build": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"npm install && npm run build\"",
"docker:build:android": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"rm -rf platforms/android plugins && ionic cordova platform add android && ionic cordova build android\"",
"docker:enter": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash", "docker:enter": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash",
"docker:fresh": "sudo docker pull registry.gitlab.com/openstapps/app", "docker:fresh": "sudo docker pull registry.gitlab.com/openstapps/app",
"docker:serve": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"npm start\"", "docker:serve": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"npm start\"",
@@ -121,7 +122,8 @@
"cordova-plugin-ionic-webview": {}, "cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {}, "cordova-plugin-ionic-keyboard": {},
"cordova-plugin-geolocation": { "cordova-plugin-geolocation": {
"GEOLOCATION_USAGE_DESCRIPTION": "The app will use your location to provide features for navigation or distances information." "GEOLOCATION_USAGE_DESCRIPTION": "The app will use your location to provide features for navigation or distances information.",
"GPS_REQUIRED": "true"
} }
}, },
"platforms": [ "platforms": [