jld3103
2 years ago
13 changed files with 128 additions and 225 deletions
@ -1,19 +0,0 @@
|
||||
part of '../neon.dart'; |
||||
|
||||
class Env { |
||||
Env({ |
||||
this.testHost, |
||||
this.testUsername, |
||||
this.testPassword, |
||||
}); |
||||
|
||||
factory Env.fromMap(final Map<String, String> data) => Env( |
||||
testHost: data['TEST_HOST'], |
||||
testUsername: data['TEST_USER'], |
||||
testPassword: data['TEST_PASSWORD'], |
||||
); |
||||
|
||||
final String? testHost; |
||||
final String? testUsername; |
||||
final String? testPassword; |
||||
} |
@ -0,0 +1,8 @@
|
||||
#!/bin/bash |
||||
set -euxo pipefail |
||||
cd "$(dirname "$0")/.." |
||||
|
||||
./tool/build-dev-container.sh |
||||
|
||||
echo "Running development instance on http://localhost. To access it in an Android Emulator use http://10.0.2.2" |
||||
docker run --rm -v nextcloud-neon-dev:/usr/src/nextcloud -v nextcloud-neon-dev:/var/www/html -p "80:80" --add-host host.docker.internal:host-gateway nextcloud-neon-dev |
@ -1,28 +0,0 @@
|
||||
#!/bin/bash |
||||
set -euxo pipefail |
||||
cd "$(dirname "$0")/.." |
||||
|
||||
ip="" |
||||
if [ "$#" -ne 1 ]; then |
||||
echo "You need to give the platform type: localhost, android-emulator" |
||||
exit 1 |
||||
elif [[ "$1" == "android-emulator" ]]; then |
||||
ip="10.0.2.2" |
||||
elif [[ "$1" == "localhost" ]]; then |
||||
ip="localhost" |
||||
else |
||||
echo "Unknown platform type: $1" |
||||
exit 1 |
||||
fi |
||||
|
||||
./tool/build-dev-container-image.sh |
||||
|
||||
echo "TEST_HOST=$ip |
||||
TEST_USER=user1 |
||||
TEST_PASSWORD=user1" > packages/neon/assets/.env |
||||
|
||||
function cleanup() { |
||||
rm packages/neon/assets/.env |
||||
} |
||||
trap cleanup EXIT |
||||
docker run --rm -v nextcloud-neon-dev:/usr/src/nextcloud -v nextcloud-neon-dev:/var/www/html -p "80:80" --add-host host.docker.internal:host-gateway nextcloud-neon-dev |
Loading…
Reference in new issue