Compare commits

...

1 Commits

Author SHA1 Message Date
Geno aff134ac07 add droneci build
continuous-integration/drone/push Build is failing Details
2021-02-10 21:02:05 +01:00
2 changed files with 45 additions and 0 deletions

14
.ci/prepare-publish.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
find -type d -name "siacs" -print0 | xargs --null -I{} bash -c 'x="{}"; mv "$x" "${x/siacs/sum7}" '
find -type f -name "*.java" -exec sed -i "/eu.siacs.conversations.axolotl/! s/eu.siacs./eu.sum7./" "{}" \;
find -type f -name "*.xml" -exec sed -i "/eu.siacs.conversations.axolotl/! s/eu.siacs./eu.sum7./" "{}" \;
# workaround for bug in fdroid nightly
sed -i "s/-debug.apk/-unsigned.apk/" /usr/lib/python3/dist-packages/fdroidserver/nightly.py
# generate new version
git fetch --tags
export versionCode="$DRONE_BUILD_NUMBER"
export versionName="$(git describe --tag --abbrev=0)-${DRONE_BUILD_NUMBER}"
echo "set VersionCode '${versionCode}' and VersonName '${versionName}'"
sed -i "s/^\(\s*versionCode\s*\).*$/\1$versionCode/" build.gradle
sed -i "0,/versionName/s/^\(\s*versionName\).*/\1 \"$versionName\"/" build.gradle
cat -n build.gradle

31
.drone.yml Normal file
View File

@ -0,0 +1,31 @@
---
kind: pipeline
type: docker
name: default
steps:
- image: registry.gitlab.com/fdroid/ci-images-client:latest
name: build
when:
branch:
exclude:
- droneci
commands:
- ./gradlew assembleConversationsFreeCompatDebug
- image: registry.gitlab.com/fdroid/ci-images-client:latest
name: publish
when:
branch:
include:
- droneci
environment:
DEBUG_KEYSTORE:
from_secret: DEBUG_KEYSTORE
commands:
- .ci/prepare-publish.sh
# build free version
- ./gradlew assembleConversationsFreeCompatRelease
- ls build/outputs/apk/conversationsFreeCompat/*
# publish on nightly fdroid repo
- fdroid nightly -v