forked from videolan/vlc-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_in_docker.sh
More file actions
executable file
·29 lines (24 loc) · 814 Bytes
/
build_in_docker.sh
File metadata and controls
executable file
·29 lines (24 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# Check if docker is installed
if ! command -v docker &> /dev/null; then
echo "Error: docker is not installed."
exit 1
fi
# Check if docker-compose is installed
if ! command -v docker-compose &> /dev/null; then
# Try docker compose (plugin)
if ! docker compose version &> /dev/null; then
echo "Error: docker-compose is not installed."
exit 1
fi
DOCKER_COMPOSE="docker compose"
else
DOCKER_COMPOSE="docker-compose"
fi
echo "Starting build environment..."
cd docker-build
$DOCKER_COMPOSE up -d
echo "Running build..."
$DOCKER_COMPOSE exec vlc-builder git config --global --add safe.directory /workspace
$DOCKER_COMPOSE exec vlc-builder gradle :application:app:assembleDebug
echo "Build complete. Artifacts are in application/app/build/outputs/apk/debug/"