mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 07:15:35 +01:00
Merge branch 'master' into appstate
This commit is contained in:
commit
8de04e7c94
7 changed files with 203 additions and 143 deletions
|
@ -18,14 +18,50 @@ jobs:
|
|||
new_build_number: ${{ steps.generate_build_number.outputs.build_number }}
|
||||
project_version: ${{ steps.determine_marketing_version.outputs.project_version }}
|
||||
ipa_output_path: ${{ steps.build_app.outputs.ipa_output_path }}
|
||||
latest_commit_message: ${{ steps.get_latest_commit_message.outputs.commit_message }}
|
||||
latest_commit_message: ${{ steps.get_latest_commit_details.outputs.commit_message }}
|
||||
branch_name: ${{ steps.get_latest_commit_details.outputs.branch_name }}
|
||||
env:
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Fetches all history
|
||||
fetch-depth: 0 # Ensures the full Git history is available
|
||||
|
||||
- name: Ensure Correct Branch
|
||||
if: github.ref != 'refs/heads/master'
|
||||
run: |
|
||||
if [ -n "${GITHUB_HEAD_REF}" ]; then
|
||||
git fetch origin ${GITHUB_HEAD_REF}:${GITHUB_HEAD_REF}
|
||||
git checkout ${GITHUB_HEAD_REF}
|
||||
else
|
||||
git fetch origin ${GITHUB_REF##*/}:${GITHUB_REF##*/}
|
||||
git checkout ${GITHUB_REF##*/}
|
||||
fi
|
||||
echo "Checked out branch: $(git rev-parse --abbrev-ref HEAD)"
|
||||
|
||||
- name: Get Latest Commit Details
|
||||
id: get_latest_commit_details
|
||||
run: |
|
||||
# Check if we are in a detached HEAD state
|
||||
if [ "$(git rev-parse --abbrev-ref HEAD)" == "HEAD" ]; then
|
||||
CURRENT_BRANCH=$(git show-ref --head -s HEAD | xargs -I {} git branch --contains {} | grep -v "detached" | head -n 1 | sed 's/^[* ]*//')
|
||||
else
|
||||
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
fi
|
||||
|
||||
LATEST_COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s")
|
||||
|
||||
echo "CURRENT_BRANCH=${CURRENT_BRANCH}" >> $GITHUB_ENV
|
||||
echo "LATEST_COMMIT_MESSAGE=${LATEST_COMMIT_MESSAGE}" >> $GITHUB_ENV
|
||||
echo "branch_name=${CURRENT_BRANCH}" >> $GITHUB_OUTPUT
|
||||
echo "commit_message=${LATEST_COMMIT_MESSAGE}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Print Commit Details
|
||||
run: |
|
||||
echo "Commit Message: ${{ env.LATEST_COMMIT_MESSAGE }}"
|
||||
echo "Branch Name: ${{ env.CURRENT_BRANCH }}"
|
||||
|
||||
- name: Specify Node.js Version
|
||||
uses: actions/setup-node@v4
|
||||
|
@ -54,13 +90,6 @@ jobs:
|
|||
run: |
|
||||
bundle exec fastlane ios install_pods
|
||||
|
||||
- name: Get Latest Commit Message
|
||||
id: get_latest_commit_message
|
||||
run: |
|
||||
LATEST_COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s")
|
||||
echo "LATEST_COMMIT_MESSAGE=${LATEST_COMMIT_MESSAGE}" >> $GITHUB_ENV
|
||||
echo "commit_message=$LATEST_COMMIT_MESSAGE" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate Build Number Based on Timestamp
|
||||
id: generate_build_number
|
||||
run: |
|
||||
|
@ -131,6 +160,7 @@ jobs:
|
|||
NEW_BUILD_NUMBER: ${{ needs.build.outputs.new_build_number }}
|
||||
PROJECT_VERSION: ${{ needs.build.outputs.project_version }}
|
||||
LATEST_COMMIT_MESSAGE: ${{ needs.build.outputs.latest_commit_message }}
|
||||
BRANCH_NAME: ${{ needs.build.outputs.branch_name }}
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v4
|
||||
|
@ -158,7 +188,7 @@ jobs:
|
|||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: BlueWallet_${{ needs.build.outputs.project_version }}_${{ needs.build.outputs.new_build_number }}.ipa
|
||||
path: ./ # Download the IPA file to the current working directory
|
||||
path: ./
|
||||
|
||||
- name: Create App Store Connect API Key JSON
|
||||
run: echo '${{ secrets.APP_STORE_CONNECT_API_KEY_CONTENT }}' > ./appstore_api_key.json
|
||||
|
@ -180,6 +210,11 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
- name: Print Environment Variables for Debugging
|
||||
run: |
|
||||
echo "LATEST_COMMIT_MESSAGE: $LATEST_COMMIT_MESSAGE"
|
||||
echo "BRANCH_NAME: $BRANCH_NAME"
|
||||
|
||||
- name: Upload to TestFlight
|
||||
run: |
|
||||
ls -la $IPA_OUTPUT_PATH
|
||||
|
|
BIN
android/gradle/wrapper/gradle-wrapper.jar
vendored
BIN
android/gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
7
android/gradlew
vendored
7
android/gradlew
vendored
|
@ -15,6 +15,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
|
@ -55,7 +57,7 @@
|
|||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
@ -84,7 +86,8 @@ done
|
|||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
|
2
android/gradlew.bat
vendored
2
android/gradlew.bat
vendored
|
@ -13,6 +13,8 @@
|
|||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
|
|
|
@ -20,10 +20,10 @@ platform :android do
|
|||
|
||||
desc "Prepare the keystore file"
|
||||
lane :prepare_keystore do
|
||||
keystore_file_hex = ENV['KEYSTORE_FILE_HEX']
|
||||
UI.user_error!("KEYSTORE_FILE_HEX environment variable is missing") if keystore_file_hex.nil?
|
||||
|
||||
Dir.chdir(project_root) do
|
||||
keystore_file_hex = ENV['KEYSTORE_FILE_HEX']
|
||||
UI.user_error!("KEYSTORE_FILE_HEX environment variable is missing") if keystore_file_hex.nil?
|
||||
|
||||
UI.message("Creating keystore from HEX...")
|
||||
File.write("bluewallet-release-key.keystore.hex", keystore_file_hex)
|
||||
|
||||
|
@ -60,34 +60,33 @@ platform :android do
|
|||
signed_apk_name = branch_name != 'master' ? "BlueWallet-#{version_name}-#{build_number}-#{branch_name}.apk" : "BlueWallet-#{version_name}-#{build_number}.apk"
|
||||
|
||||
# Build APK
|
||||
Dir.chdir("android") do
|
||||
UI.message("Building APK...")
|
||||
gradle(task: "assembleRelease", project_dir: "android")
|
||||
UI.message("APK build completed.")
|
||||
UI.message("Building APK...")
|
||||
sh("cd android && ./gradlew assembleRelease")
|
||||
UI.message("APK build completed.")
|
||||
|
||||
# Define paths
|
||||
unsigned_apk_path = "app/build/outputs/apk/release/app-release-unsigned.apk"
|
||||
signed_apk_path = "app/build/outputs/apk/release/#{signed_apk_name}"
|
||||
# Define paths
|
||||
unsigned_apk_path = "android/app/build/outputs/apk/release/app-release-unsigned.apk"
|
||||
signed_apk_path = "android/app/build/outputs/apk/release/#{signed_apk_name}"
|
||||
|
||||
# Rename APK
|
||||
if File.exist?(unsigned_apk_path)
|
||||
UI.message("Renaming APK to #{signed_apk_name}...")
|
||||
FileUtils.mv(unsigned_apk_path, signed_apk_path)
|
||||
ENV['APK_OUTPUT_PATH'] = File.expand_path(signed_apk_path)
|
||||
else
|
||||
UI.error("Unsigned APK not found at path: #{unsigned_apk_path}")
|
||||
next
|
||||
end
|
||||
|
||||
# Sign APK
|
||||
UI.message("Signing APK with apksigner...")
|
||||
apksigner_path = "#{ENV['ANDROID_HOME']}/build-tools/34.0.0/apksigner"
|
||||
sh("#{apksigner_path} sign --ks ./bluewallet-release-key.keystore --ks-pass=pass:#{ENV['KEYSTORE_PASSWORD']} #{signed_apk_path}")
|
||||
UI.message("APK signed successfully: #{signed_apk_path}")
|
||||
# Rename APK
|
||||
if File.exist?(unsigned_apk_path)
|
||||
UI.message("Renaming APK to #{signed_apk_name}...")
|
||||
FileUtils.mv(unsigned_apk_path, signed_apk_path)
|
||||
ENV['APK_OUTPUT_PATH'] = File.expand_path(signed_apk_path)
|
||||
else
|
||||
UI.error("Unsigned APK not found at path: #{unsigned_apk_path}")
|
||||
next
|
||||
end
|
||||
|
||||
# Sign APK
|
||||
UI.message("Signing APK with apksigner...")
|
||||
apksigner_path = "#{ENV['ANDROID_HOME']}/build-tools/34.0.0/apksigner"
|
||||
sh("#{apksigner_path} sign --ks #{project_root}/bluewallet-release-key.keystore --ks-pass=pass:#{ENV['KEYSTORE_PASSWORD']} #{signed_apk_path}")
|
||||
UI.message("APK signed successfully: #{signed_apk_path}")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
desc "Upload APK to BrowserStack and post result as PR comment"
|
||||
lane :upload_to_browserstack_and_comment do
|
||||
Dir.chdir(project_root) do
|
||||
|
@ -294,22 +293,43 @@ platform :ios do
|
|||
cocoapods(podfile: "ios/Podfile")
|
||||
end
|
||||
|
||||
desc "Upload IPA to TestFlight"
|
||||
lane :upload_to_testflight_lane do
|
||||
ipa_path = ENV['IPA_OUTPUT_PATH']
|
||||
changelog = ENV["LATEST_COMMIT_MESSAGE"]
|
||||
|
||||
# Check if IPA exists before proceeding
|
||||
desc "Upload IPA to TestFlight"
|
||||
lane :upload_to_testflight_lane do
|
||||
|
||||
branch_name = ENV['BRANCH_NAME'] || "unknown-branch"
|
||||
last_commit_message = ENV['LATEST_COMMIT_MESSAGE'] || "No commit message found"
|
||||
|
||||
|
||||
changelog = <<~CHANGELOG
|
||||
Build Information:
|
||||
CHANGELOG
|
||||
|
||||
# Include the branch name only if it is not 'master'
|
||||
if branch_name != 'master'
|
||||
changelog += <<~CHANGELOG
|
||||
- Branch: #{branch_name}
|
||||
CHANGELOG
|
||||
end
|
||||
|
||||
changelog += <<~CHANGELOG
|
||||
- Commit: #{last_commit_message}
|
||||
CHANGELOG
|
||||
|
||||
ipa_path = ENV['IPA_OUTPUT_PATH']
|
||||
|
||||
if ipa_path.nil? || ipa_path.empty? || !File.exist?(ipa_path)
|
||||
UI.user_error!("IPA file not found at path: #{ipa_path}")
|
||||
end
|
||||
|
||||
UI.message("Uploading IPA to TestFlight from path: #{ipa_path}")
|
||||
UI.message("Changelog:\n#{changelog}")
|
||||
|
||||
|
||||
upload_to_testflight(
|
||||
api_key_path: "./appstore_api_key.json",
|
||||
ipa: ipa_path,
|
||||
skip_waiting_for_build_processing: true, # Do not wait for processing
|
||||
skip_waiting_for_build_processing: true,
|
||||
changelog: changelog
|
||||
)
|
||||
|
||||
|
|
|
@ -214,6 +214,7 @@
|
|||
"block_explorer_invalid_custom_url": "La URL proporcionada no es válida. Ingresa una URL válida que comience con http:// o https://.",
|
||||
"about_selftest_electrum_disabled": "La autocomprobación no está disponible con el modo sin conexión de Electrum. Desactiva el modo sin conexión y vuelve a intentarlo. ",
|
||||
"about_selftest_ok": "Todas las pruebas internas han pasado satisfactoriamente. La billetera funciona bien.",
|
||||
|
||||
"about_sm_github": "GitHub",
|
||||
"about_sm_discord": "Servidor Discord",
|
||||
"about_sm_telegram": "Chat de Telegram ",
|
||||
|
@ -248,8 +249,7 @@
|
|||
"electrum_settings_server": "Servidor Electrum",
|
||||
"electrum_status": "Estado",
|
||||
"electrum_preferred_server": "Servidor preferido",
|
||||
"electrum_preferred_server_description": "Introduce el servidor que deseas que tu billetera utilice para todas las actividades de Bitcoin. Una vez configurado, tu billetera utilizará exclusivamente este servidor para comprobar saldos, enviar transacciones y obtener datos de la red. Asegúrate de que confías en este servidor antes de configurarlo.",
|
||||
"electrum_clear_alert_title": "¿Borrar historial?",
|
||||
"electrum_preferred_server_description": "Introduce el servidor que deseas que tu billetera utilice para todas las actividades de Bitcoin. Una vez configurado, tu billetera utilizará exclusivamente este servidor para comprobar saldos, enviar transacciones y obtener datos de la red. Asegúrate de que confías en este servidor antes de configurarlo.", "electrum_clear_alert_title": "¿Borrar historial?",
|
||||
"electrum_clear_alert_message": "¿Quieres borrar el historial de los servidores de Electrum?",
|
||||
"electrum_clear_alert_cancel": "Cancelar",
|
||||
"electrum_clear_alert_ok": "Ok",
|
||||
|
@ -460,7 +460,7 @@
|
|||
"list_empty_txs2_lightning": "\nPara comenzar a usarla, toca Administrar Fondos y recarga tu saldo.",
|
||||
"list_latest_transaction": "Última Transacción",
|
||||
"list_long_choose": "Elige una Foto",
|
||||
"paste_from_clipboard": "Pegar desde el portapapeles",
|
||||
"paste_from_clipboard": "Pegar",
|
||||
"import_file": "Importar Archivo",
|
||||
"list_long_scan": "Escanear Código QR",
|
||||
"list_title": "Billeteras",
|
||||
|
@ -646,7 +646,7 @@
|
|||
"notification_tx_unconfirmed": "La transacción de notificación aún no está confirmada, espera",
|
||||
"failed_create_notif_tx": "No se pudo crear una transacción en cadena",
|
||||
"onchain_tx_needed": "Se necesita transacción en cadena",
|
||||
"notif_tx_sent": "Transacción de notificación enviada. Espera a que se confirme",
|
||||
"notif_tx_sent" : "Transacción de notificación enviada. Espera a que se confirme",
|
||||
"notif_tx": "Transacción de notificación",
|
||||
"not_found": "Código de pago no encontrado"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue