mirror of
https://github.com/kiwix/kiwix-build.git
synced 2025-06-26 10:11:27 +00:00
Add script to build customapp
This commit is contained in:
13
travis/compile_custom_app.sh
Executable file
13
travis/compile_custom_app.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
cd ${HOME}
|
||||
|
||||
${TRAVIS_BUILD_DIR}/kiwix-build.py \
|
||||
--target-platform $PLATFORM \
|
||||
--hide-progress \
|
||||
--android-custom-app $CUSTOM_APP \
|
||||
--zim-file-size $ZIM_FILE_SIZE \
|
||||
kiwix-android-custom
|
||||
|
27
travis/deploy_apk.sh
Executable file
27
travis/deploy_apk.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
KEYSTORE_FILE=${TRAVIS_BUILD_DIR}/travis/test_ks.ks
|
||||
GOOGLE_API_KEY=${TRAVIS_BUILD_DIR}/travis/googleplay_android_developer-5a411156212c.json
|
||||
SSH_KEY=${TRAVIS_BUILD_DIR}/travis/travisci_builder_id_key
|
||||
|
||||
cd ${HOME}
|
||||
|
||||
# Sign apk file
|
||||
|
||||
BASE_DIR="BUILD_${PLATFORM}"
|
||||
INPUT_APK_FILE=${BASE_DIR}/kiwix-android-custom_${CUSTOM_APP}/app/build/outputs/apk/app-${CUSTOM_APP}-release-unsigned.apk
|
||||
SIGNED_APK=${BASE_DIR}/app-${CUSTOM_APP}_${VERSION_CODE}-release-signed.apk
|
||||
|
||||
TOOLCHAINS/android-sdk-r25.2.3/build-tools/25.0.2/apksigner sign \
|
||||
--ks ${KEYSTORE_FILE} \
|
||||
--ks-pass env:KEYSTORE_PASS \
|
||||
--out ${SIGNED_APK} \
|
||||
${INPUT_APK_FILE}
|
||||
|
||||
ssh -i ${SSH_KEY} nightlybot@download.kiwix.org "mkdir -p ~/apks/${CUSTOM_APP}_${BASE_VERSION}"
|
||||
|
||||
scp -i ${SSH_KEY} \
|
||||
${SIGNED_APK} \
|
||||
nightlybot@download.kiwix.org:~/apks/${CUSTOM_APP}_${BASE_VERSION}
|
BIN
travis/googleplay_android_developer-5a411156212c.json.enc
Normal file
BIN
travis/googleplay_android_developer-5a411156212c.json.enc
Normal file
Binary file not shown.
@ -5,8 +5,9 @@ set -e
|
||||
orig_dir=$(pwd)
|
||||
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -qq python3-pip
|
||||
sudo apt-get install -qq python3-pip zlib1g-dev libjpeg-dev
|
||||
pip3 install meson
|
||||
pip3 install pillow
|
||||
|
||||
# ninja
|
||||
git clone git://github.com/ninja-build/ninja.git
|
||||
|
28
travis/make_release.sh
Executable file
28
travis/make_release.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
KEYSTORE_FILE=${TRAVIS_BUILD_DIR}/travis/test_ks.ks
|
||||
GOOGLE_API_KEY=${TRAVIS_BUILD_DIR}/travis/googleplay_android_developer-5a411156212c.json
|
||||
SSH_KEY=${TRAVIS_BUILD_DIR}/travis/travisci_builder_id_key
|
||||
|
||||
cd ${HOME}
|
||||
|
||||
|
||||
BASE_DIR="BUILD_${PLATFORM}"
|
||||
|
||||
mkdir -p ${HOME}/APKS
|
||||
|
||||
scp -i ${SSH_KEY} nightlybot@download.kiwix.org:~/apks/${CUSTOM_APP}_${BASE_VERSION}/* ${HOME}/APKS
|
||||
|
||||
ssh -i ${SSH_KEY} nightlybot@download.kiwix.org "rm -rf ~/apks/${CUSTOM_APP}_${BASE_VERSION}"
|
||||
|
||||
${TRAVIS_BUILD_DIR}/build_custom_app.py \
|
||||
--step publish \
|
||||
--custom-app ${CUSTOM_APP} \
|
||||
--package-name ${PACKAGE_NAME} \
|
||||
--google-api-key ${GOOGLE_API_KEY} \
|
||||
--version ${VERSION} \
|
||||
--zim-url ${ZIM_URL} \
|
||||
--apks-dir ${HOME}/APKS \
|
||||
--content-version-code ${CONTENT_VERSION_CODE}
|
BIN
travis/test_ks.ks.enc
Normal file
BIN
travis/test_ks.ks.enc
Normal file
Binary file not shown.
Reference in New Issue
Block a user