-
Notifications
You must be signed in to change notification settings - Fork 542
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile for local F-Droid builds
- Loading branch information
Showing
3 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM registry.gitlab.com/fdroid/docker-executable-fdroidserver:master | ||
|
||
COPY fdroid-build.sh / | ||
|
||
ENTRYPOINT ["bash", "/fdroid-build.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/env bash | ||
|
||
set -x; | ||
|
||
echo "Building latest de.tutao.tutanota" | ||
VERCODE=$(grep CurrentVersionCode metadata/de.tutao.tutanota.yml | awk '{print $2}') | ||
echo "Version: $VERCODE" | ||
|
||
# get all those good env vars that we need (like $fdroidserver and $home_vagrant) | ||
source /etc/profile.d/bsenv.sh; | ||
|
||
# PYTHONPATH is needed to find the plugins, we need fetchsrclibs. | ||
export fdroid="sudo --preserve-env --user vagrant | ||
env PATH=$fdroidserver:$PATH | ||
env PYTHONPATH=$fdroidserver:$fdroidserver/examples | ||
env PYTHONUNBUFFERED=true | ||
env TERM=$TERM | ||
env HOME=$home_vagrant | ||
fdroid"; | ||
|
||
# We move the data we need into vagrant home. There are some guards against just running in the data repo. | ||
ln -s $PWD/srclibs/ $home_vagrant/srclibs; | ||
mkdir $home_vagrant/metadata; | ||
cp metadata/de.tutao.tutanota.yml $home_vagrant/metadata/; | ||
|
||
# Start the build in home dir. | ||
cd $home_vagrant; | ||
# This will fetch rustup for us but not actually install anything. | ||
$fdroid fetchsrclibs de.tutao.tutanota:$VERCODE --verbose; | ||
# Run the actual build. | ||
$fdroid build --verbose --test --on-server --no-tarball de.tutao.tutanota:$VERCODE; |