15 lines
852 B
Bash
15 lines
852 B
Bash
|
#!/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
|