This repository has been archived by the owner on Nov 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuildfile
45 lines (40 loc) · 1.53 KB
/
Buildfile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
include "config.sh"
target_droid(){
target_container
exec docker run -v "'$STORAGE_DIR:/opt/droid/buildroot'" \
-v "'$BASEDIR/config.sh:/opt/droid/config/config.sh'" \
-v "'$PREV_BUILD_DIR:/opt/droid/buildroot/out_dir'" \
-it droidbuild
}
target_generate-keys(){
target_container
info Launching signing keys generation in docker
exec rm -f $PREV_BUILD_DIR/certbundle.zip.sc
exec docker run -v \
"'$STORAGE_DIR:/opt/droid/buildroot'" \
-v "'$PREV_BUILD_DIR:/opt/droid/buildroot/out_dir'" \
-v "'$BASEDIR/config.sh:/opt/droid/config/config.sh'" \
--entrypoint '/opt/droid/scripts/container-generate-keys.sh' \
-it droidbuild
success Key generation successful
}
target_container(){
require_root
require_command docker
info "Building docker image"
exec docker build . -t droidbuild
}
target_container-unpack(){
target_container
exec docker run -v "'$STORAGE_DIR:/opt/droid/buildroot'" \
-v "'$BASEDIR/config.sh:/opt/droid/config/config.sh'" \
-v "'$PREV_BUILD_DIR:/opt/droid/buildroot/out_dir'" \
--entrypoint /opt/droid/docker-unpack.sh -it droidbuild
}
target_shell(){
target_container
exec docker run -v "'$STORAGE_DIR:/opt/droid/buildroot'" \
-v "'$BASEDIR/config.sh:/opt/droid/config/config.sh'" \
-v "'$PREV_BUILD_DIR:/opt/droid/buildroot/out_dir'" \
--entrypoint /bin/bash -it droidbuild
}