feat(install): build the Flutter web app in Docker, optional ./install --apk, chosen web password, startup report
This commit is contained in:
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
# Builds the app from the read-only source at /src into /out.
|
||||
# Usage: pipelines-app-build web|apk [flutter build arguments...]
|
||||
set -eu
|
||||
kind="$1"
|
||||
shift
|
||||
rm -rf /tmp/work && mkdir -p /tmp/work
|
||||
# A private copy: the host checkout's build outputs and machine paths stay out.
|
||||
(cd /src && tar --exclude=./build --exclude=./.dart_tool --exclude=./android/.gradle \
|
||||
--exclude=./android/local.properties --exclude=./android/app/.cxx --exclude=./ios/Pods \
|
||||
-cf - .) | tar -C /tmp/work -xf -
|
||||
cd /tmp/work
|
||||
flutter pub get
|
||||
case "$kind" in
|
||||
web)
|
||||
flutter build web --release --no-web-resources-cdn "$@"
|
||||
cp -R build/web/. /out/
|
||||
;;
|
||||
apk)
|
||||
flutter build apk --release "$@"
|
||||
cp build/app/outputs/flutter-apk/app-release.apk /out/pipelines.apk
|
||||
;;
|
||||
*)
|
||||
echo "unknown build: $kind" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user