From 0f03e04e867f01a4f05734893441ad9a6fae5c7f Mon Sep 17 00:00:00 2001 From: Patrick Baxter Date: Tue, 1 Oct 2024 15:20:07 +1300 Subject: [PATCH] fix keystore location --- sidekick/fastlane/Fastfile | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/sidekick/fastlane/Fastfile b/sidekick/fastlane/Fastfile index 3d94a24d..608d6e51 100755 --- a/sidekick/fastlane/Fastfile +++ b/sidekick/fastlane/Fastfile @@ -1,26 +1,15 @@ -# This file contains the fastlane.tools configuration -# You can find the documentation at https://docs.fastlane.tools -# -# For a list of all available actions, check out -# -# https://docs.fastlane.tools/actions -# -# For a list of all available plugins, check out -# -# https://docs.fastlane.tools/plugins/available-plugins -# - -# Uncomment the line if you want fastlane to automatically update itself -# update_fastlane +# fastlane/Fastfile default_platform(:android) platform :android do desc "Build and upload the app to Google Play Alpha track" lane :alpha do - # Load keystore properties + # Load keystore properties from ~/.android/ keystore_properties = {} - File.open("keystore.properties") do |file| + keystore_path = File.expand_path("~/.android/keystore.properties") + UI.user_error!("Couldn't find keystore.properties file at #{keystore_path}") unless File.exist?(keystore_path) + File.open(keystore_path) do |file| file.each_line do |line| key, value = line.strip.split('=') keystore_properties[key] = value @@ -43,7 +32,7 @@ platform :android do upload_to_play_store( track: 'alpha', aab: 'app/build/outputs/bundle/release/app-release.aab', - json_key: "api.json" + json_key: ENV['GOOGLE_PLAY_JSON_KEY'] ) end end