From b9f306218ddbab4164d0de36c61a9a412345a559 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Mon, 4 May 2026 15:15:48 +0200 Subject: [PATCH 1/2] fix: mapping for fdroid not found, builds without version code --- .github/actions/deploy-to-s3/action.yml | 31 ++++++++++++++++++------- kalium | 2 +- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.github/actions/deploy-to-s3/action.yml b/.github/actions/deploy-to-s3/action.yml index dc6b5d53924..58c489055ee 100644 --- a/.github/actions/deploy-to-s3/action.yml +++ b/.github/actions/deploy-to-s3/action.yml @@ -69,15 +69,19 @@ runs: run: | filename=${{ steps.path.outputs.apk_full_path }} - # Extract version name and version code version=$(echo "$filename" | sed -E 's/.*-v([0-9]+\.[0-9]+\.[0-9]+).*/\1/') - version_code=$(echo "$filename" | sed -E 's/.*-([0-9]+)-${{ inputs.build-flavour }}-${{ inputs.build-variant }}\.apk/\1/') - # Print the extracted version and version code + version_code=$(echo "$filename" | sed -n -E 's/.*-([0-9]+)-${{ inputs.build-flavour }}-${{ inputs.build-variant }}\.apk/\1/p') + + if [[ -z "$version" ]]; then + echo "Failed to extract version" + echo "filename=$filename" + exit 1 + fi + echo "Extracted version: v$version" echo "Extracted version code: $version_code" - # set them as environment variables for later use echo "VERSION=v$version" >> $GITHUB_ENV echo "VERSION_CODE=$version_code" >> $GITHUB_ENV - name: Rename mapping file @@ -85,10 +89,21 @@ runs: shell: bash id: mapping run: | - capitalized_variant=$(echo "${{ inputs.build-variant }}" | awk '{print toupper(substr($0,1,1)) tolower(substr($0,2))}') - echo "Capitalized Variant: $capitalized_variant" - mapping_full_path="app/build/outputs/mapping/${{ inputs.build-flavour }}${capitalized_variant}/mapping.txt" - new_mapping_file_name="mapping-${{ env.VERSION }}-${{ env.VERSION_CODE }}-${{ inputs.build-flavour }}-${{ inputs.build-variant }}.txt" + mapping_full_path=$(find app/build/outputs/mapping -type f -name mapping.txt | grep "/${{ inputs.build-flavour }}" | head -n1) + + if [[ -z "$mapping_full_path" ]]; then + echo "Failed to locate mapping.txt for ${{ inputs.build-flavour }}${{ inputs.build-variant }}" + find app/build/outputs/mapping -type f -name mapping.txt + exit 1 + fi + + if [[ -n "${{ env.VERSION_CODE }}" ]]; then + new_mapping_file_name="mapping-${{ env.VERSION }}-${{ env.VERSION_CODE }}-${{ inputs.build-flavour }}-${{ inputs.build-variant }}.txt" + else + # e.g. FDroid does not have version code + new_mapping_file_name="mapping-${{ env.VERSION }}-${{ inputs.build-flavour }}-${{ inputs.build-variant }}.txt" + fi + mv "$mapping_full_path" "$new_mapping_file_name" # Set the new mapping file name as an environment variable echo "new_mapping_file_name=$new_mapping_file_name" >> $GITHUB_ENV diff --git a/kalium b/kalium index a3b59d3d899..931d5ce6289 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit a3b59d3d8998387672ee4316a813b481a4c9d34b +Subproject commit 931d5ce62895236d83b6b961b5cf565ce4751cfa From f52b9f72df602d43f463d10166693d310f63ca2a Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Mon, 4 May 2026 18:07:28 +0200 Subject: [PATCH 2/2] kalium ref --- kalium | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kalium b/kalium index 931d5ce6289..04c2d793636 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit 931d5ce62895236d83b6b961b5cf565ce4751cfa +Subproject commit 04c2d793636f31e44bc4f2eb913c90e4f912256b