~xdavidwu/android-autobuilds

6aac66148a24646973c6d8655ee93b62ae500115 — xdavidwu 1 year, 9 months ago 0492af1
build: handle multiple apks
1 files changed, 6 insertions(+), 4 deletions(-)

M build.yml
M build.yml => build.yml +6 -4
@@ 25,11 25,13 @@ tasks:
  - deploy: |
      cd "$source"
      ver=$(git rev-parse HEAD)
      test -f build/outputs/apk/debug/*-debug.apk && apk=$(echo build/outputs/apk/debug/*-debug.apk) || true
      test -f */build/outputs/apk/debug/*-debug.apk && apk=$(echo */build/outputs/apk/debug/*-debug.apk) || true
      test -f "$apk"
      ls build/outputs/apk/debug/*-debug.apk && apk=$(echo build/outputs/apk/debug/*-debug.apk) || true
      ls */build/outputs/apk/debug/*-debug.apk && apk=$(echo */build/outputs/apk/debug/*-debug.apk) || true
      test -n "$apk"
      echo "StrictHostKeyChecking=no" >> ~/.ssh/config
      ssh deploy@fdroid.xdavidwu.link "$source-debug-$ver.apk" < "$apk"
      for a in $apk; do
        ssh deploy@fdroid.xdavidwu.link "$(basename $a | sed s/\.apk/-$ver.apk/)" < $a
      done
triggers:
  - action: email
    condition: always