mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-05-10 00:06:08 -04:00
Add fdroid build script helpers
This commit is contained in:
@@ -13,7 +13,7 @@ services:
|
||||
# Overwrite the net.aliasvault.app.yml file with the local one which forces build to use latest commit from main branch
|
||||
- ./net.aliasvault.app.yml:/build/metadata/net.aliasvault.app.yml
|
||||
# Add build script to the container
|
||||
- ./build.sh:/build.sh:Z
|
||||
- ./scripts/build.sh:/build.sh:Z
|
||||
# Increase memory limits for Gradle builds
|
||||
shm_size: '2gb'
|
||||
mem_limit: 12g
|
||||
|
||||
30
apps/mobile-app/android/fdroid/run.sh
Executable file
30
apps/mobile-app/android/fdroid/run.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
set -e # Exit on any error, except where explicitly ignored
|
||||
trap 'echo "🛑 Interrupted. Exiting..."; exit 130' INT # Handle Ctrl+C cleanly
|
||||
|
||||
# Function to safely clone or update a repo
|
||||
clone_or_update() {
|
||||
local repo_url=$1
|
||||
local dir_name=$(basename "$repo_url" .git)
|
||||
|
||||
if [ -d "$dir_name/.git" ]; then
|
||||
echo "Updating existing repository: $dir_name"
|
||||
git -C "$dir_name" pull origin master || echo "⚠️ Warning: Failed to pull updates for $dir_name, continuing..."
|
||||
else
|
||||
echo "Cloning repository: $repo_url"
|
||||
git clone --depth=1 "$repo_url" "$dir_name" || echo "⚠️ Warning: Failed to clone $repo_url, continuing..."
|
||||
fi
|
||||
}
|
||||
|
||||
# Clone or update both repositories
|
||||
clone_or_update "https://gitlab.com/fdroid/fdroiddata.git"
|
||||
clone_or_update "https://gitlab.com/fdroid/fdroidserver.git"
|
||||
|
||||
# Build and run the Docker environment
|
||||
echo "Building Docker images..."
|
||||
if ! docker compose build; then
|
||||
echo "⚠️ Warning: Docker build failed, continuing..."
|
||||
fi
|
||||
|
||||
echo "Running fdroid-buildserver..."
|
||||
docker compose run --rm fdroid-buildserver
|
||||
Reference in New Issue
Block a user