mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-21 17:05:39 +03:00
Make split ABI fdroid-checkupdates-friendly
This partially reverts 92e9d9e747
.
Change-Id: I6f3d84db8ef75a363761cbd6fa2b90f2e657f72b
This commit is contained in:
parent
030e1f853f
commit
7fb2e3fdf7
2 changed files with 8 additions and 12 deletions
|
@ -23,8 +23,6 @@ fi
|
|||
if [ "$1" = "test" ]; then
|
||||
release_type="test"
|
||||
previousTestVersionCode="$2"
|
||||
# Remove last digit for internal version codes without split ABI
|
||||
previousTestVersionCode=`echo "$previousTestVersionCode" | sed 's|[0-9]$||'`
|
||||
else
|
||||
release_type="normal"
|
||||
fi
|
||||
|
@ -93,9 +91,8 @@ if [ "$release_type" = "test" ]; then
|
|||
else
|
||||
versionCode=$((previousVersionCode + 10))
|
||||
# Ensure the new version code is higher than the one of the last test version
|
||||
# Note that `versionCode` from build.gradle is before multiplying with 10 for split ABI, so here we remove the last digit
|
||||
if [ -f "$HOME/fdroid/sm/data/metadata/de.spiritcroc.riotx.x.yml" ]; then
|
||||
lastTestVersionCode="$(cat "$HOME/fdroid/sm/data/metadata/de.spiritcroc.riotx.x.yml"|grep versionCode|tail -n 1|sed 's|.*: ||;s|[0-9]$||')"
|
||||
lastTestVersionCode="$(cat "$HOME/fdroid/sm/data/metadata/de.spiritcroc.riotx.x.yml"|grep versionCode|tail -n 1|sed 's|.*: ||')"
|
||||
else
|
||||
read -p "Enter versionCode of last test version: " lastTestVersionCode
|
||||
fi
|
||||
|
@ -113,11 +110,8 @@ fi
|
|||
|
||||
new_tag="sc_v$version"
|
||||
|
||||
# Append 0 for universal apk
|
||||
universalVersionCode="${versionCode}0"
|
||||
|
||||
if ((preview)); then
|
||||
echo "versionCode ${universalVersionCode}"
|
||||
echo "versionCode $versionCode"
|
||||
echo "versionName $version"
|
||||
exit 0
|
||||
fi
|
||||
|
@ -159,7 +153,7 @@ git_changelog() {
|
|||
}
|
||||
|
||||
changelog_dir=fastlane/metadata/android/en-US/changelogs
|
||||
changelog_file="$changelog_dir/$universalVersionCode.txt"
|
||||
changelog_file="$changelog_dir/$versionCode.txt"
|
||||
mkdir -p "$changelog_dir"
|
||||
if [ "$release_type" = "test" ]; then
|
||||
git_changelog > "$changelog_file"
|
||||
|
@ -192,7 +186,7 @@ done
|
|||
|
||||
git add -A
|
||||
if [ "$release_type" = "test" ]; then
|
||||
git commit -m "Test version $universalVersionCode"
|
||||
git commit -m "Test version $versionCode"
|
||||
else
|
||||
git commit -m "Increment version"
|
||||
git tag "$new_tag"
|
||||
|
|
|
@ -156,7 +156,7 @@ android {
|
|||
renderscriptTargetApi 24
|
||||
renderscriptSupportModeEnabled true
|
||||
|
||||
versionCode 4010120
|
||||
versionCode 40101200
|
||||
versionName "1.6.5.sc70"
|
||||
|
||||
// Generate a random app task affinity
|
||||
|
@ -196,7 +196,9 @@ android {
|
|||
|
||||
applicationVariants.all { variant ->
|
||||
// assign different version code for each output
|
||||
def baseVariantVersion = variant.versionCode * 10
|
||||
// SC: Comparet do upstream, we do not multiply by ten,
|
||||
// compare https://gitlab.com/fdroid/fdroiddata/-/commit/3a615a9b85960cf2a165e78436870290a8f3d9e5#note_1502091143
|
||||
def baseVariantVersion = variant.versionCode
|
||||
variant.outputs.each { output ->
|
||||
def baseAbiVersionCode = project.ext.abiVersionCodes.get(output.getFilter(OutputFile.ABI))
|
||||
// Known limitation: it does not modify the value in the BuildConfig.java generated file
|
||||
|
|
Loading…
Reference in a new issue