From 84beb35c31fe2c51c91f05543829488f717d5f6b Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Fri, 29 Jul 2022 09:08:16 +0200 Subject: [PATCH] Chore: docs and more logs --- README.md | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- qt-build | 6 ++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fa2dc78..e2b66c4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,50 @@ # qt-android -A drone plugin for building Qt apps for Android. \ No newline at end of file +A drone plugin for building Qt apps for Android. + +# Usage + +The following settings changes this plugin's behavior. + +* qmake_arguments (optional) additional arguments for qmake. +* androiddeployqt_arguments (optional) additional arguments for androiddeployqt. + +Below is an example `.drone.yml` that uses this plugin. + +```yaml +kind: pipeline +name: default + +steps: +- name: run itsblue.dev/plugins/qt-android plugin + image: itsblue.dev/plugins/qt-android + pull: if-not-exists + settings: + qmake_attributes: "CONFIG+=release" + androiddeployqt_attributes: "--aab" +``` + +# Building + +Build the plugin image: + +```text +docker build -t itsblue.dev/plugins/qt-android -f Dockerfile . +``` + +# Testing + +Execute the plugin from your current working directory: + +```text +docker run --rm -e PLUGIN_FOLDER=public -e PLUGIN_SSH_KEY=foo \ + -e DRONE_COMMIT_SHA=8f51ad7884c5eb69c11d260a31da7a745e6b78e2 \ + -e DRONE_COMMIT_BRANCH=master \ + -e DRONE_BUILD_NUMBER=43 \ + -e DRONE_BUILD_STATUS=success \ + -e PLUGIN_QMAKE_ARGUMENTS="CONFIG+=release" + -e PLUGIN_ANDROIDDEPLOYQT_ARGUMENTS="--aab" + -w /drone/src \ + -v $(pwd):/drone/src \ + itsblue.dev/plugins/qt-android +``` diff --git a/qt-build b/qt-build index 6d32ed3..6506fbe 100755 --- a/qt-build +++ b/qt-build @@ -6,6 +6,12 @@ set -e SRC_DIR=$(pwd) +echo "**** environment: ****" +echo "* QMAKE_ARGUMENTS=${QMAKE_ARGUMENTS}" +echo "* ANDROIDDEPLOYQT_ARGUMENTS=${PLUGIN_ANDROIDDEPLOYQT_ARGUMENTS}" +echo "* SRC_DIR=${SRC_DIR}" +echo "**********************" +echo "" echo "**** prepare ****" rm -rf /build mkdir -p /build