Skip to content

Commit

Permalink
removing not functioning code
Browse files Browse the repository at this point in the history
  • Loading branch information
Panosfunk committed Sep 18, 2024
1 parent c6256a6 commit c0f7e71
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,19 @@ platform :android do
sh "flutter pub get"
sh "flutter pub upgrade"

pubspec_content = YAML.load_file('../../pubspec.yaml')
# current_version_code = google_play_track_version_codes(track: 'internal')
version_string = pubspec_content['version']
version_parts = version_string.split('+')
if version_parts.size == 2
version_number = version_parts[1].to_i
new_version_number = version_number + 1
pubspec_content['version'] = "#{version_parts[0]}+#{new_version_number}"
else
UI.user_error!("Version string format is incorrect")
end
File.open('../..pubspect.yaml', 'w') { |f| f.write(pubspec_content.to_yaml) }
# This is here to update the version code in the pubspec.yaml file but doesnt work
# pubspec_content = YAML.load_file('../../pubspec.yaml')
# # current_version_code = google_play_track_version_codes(track: 'internal')
# version_string = pubspec_content['version']
# version_parts = version_string.split('+')
# if version_parts.size == 2
# version_number = version_parts[1].to_i
# new_version_number = version_number + 1
# pubspec_content['version'] = "#{version_parts[0]}+#{new_version_number}"
# else
# UI.user_error!("Version string format is incorrect")
# end
# File.open('../..pubspect.yaml', 'w') { |f| f.write(pubspec_content.to_yaml) }

sh "flutter build appbundle --release --no-deferred-components --no-tree-shake-icons"
upload_to_play_store(
Expand Down

0 comments on commit c0f7e71

Please sign in to comment.