diff options
author | cyBerta <cyberta@riseup.net> | 2019-05-24 19:37:20 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2019-08-02 01:49:37 +0200 |
commit | e2d191063820078150389a5a992270455ea72b6a (patch) | |
tree | 71b8ec1e2aaa9436a4f364e78a2b32d23609ab52 | |
parent | f64d616754f057db76754738399ba8e242c8c69b (diff) |
add missing pieces to build shapeshifter-dispatcher on CI
-rwxr-xr-x | build_deps.sh | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/build_deps.sh b/build_deps.sh index 023baed5..52ba7e56 100755 --- a/build_deps.sh +++ b/build_deps.sh @@ -1,22 +1,38 @@ #!/bin/bash function quit { - echo "Task failed. Exit value: $?." + echo "Task failed. $1." exit 1 } DIR_OVPNASSETS=./ics-openvpn/main/build/ovpnassets DIR_OVPNLIBS=./ics-openvpn/main/build/intermediates/cmake/noovpn3/release/obj +DIR_GOLANG=./go/golang/ +DIR_SHAPESHIFTER_DISPATCHER=./go/src/ +FILE_X86=./go/out/x86/piedispatcher +FILE_ARM=./go/out/armeabi-v7a/piedispatcher + # init -# look for empty dir +# look for empty dir if [[ $(ls -A ${DIR_OVPNASSETS}) && $(ls -A ${DIR_OVPNLIBS}) ]] then echo "Dirty build: skipped externalNativeBuild - reusing existing libs" else - echo "Clean build: starting externalNativeBuild" - cd ./ics-openvpn || quit - ./gradlew clean main:externalNativeBuildCleanNoovpn3Release main:externalNativeBuildNoovpn3Release --debug --stacktrace || quit - cd .. -fi
\ No newline at end of file + echo "Clean build: starting externalNativeBuild and GO dependency builds" + cd ./ics-openvpn || quit "Directory ics-opevpn not found" + ./gradlew clean main:externalNativeBuildCleanNoovpn3Release main:externalNativeBuildNoovpn3Release --debug --stacktrace || quit "Build ics-openvpn native libraries failed" + cd .. +fi + +if [[ $(ls -A ${FILE_X86}) && $(ls -A ${FILE_ARM}) ]] +then + echo "Dirty build: Reusing go libraries" +else + echo "Clean build: compiling Go libraries" + cd ./go || quit "Directory go not found" + ./android_build_shapeshifter_dispatcher.sh clean || quit "android_build_shapeshifter_dispatcher.sh clean failed" + ./install_go.sh || quit "install_go.sh failed" + ./android_build_shapeshifter_dispatcher.sh || quit "android_build_shapeshifter_dispatcher.sh failed" +fi |