Giter VIP home page Giter VIP logo

fastlane-plugin-flutter_version's Introduction

flutter_version (Fastlane plugin)

All Contributors

fastlane Plugin Badge Gitpod Ready-to-Code codecov

flutter_version is a Fastlane plugin to retrieve version code from Flutter projects which can be used to release changlogs and other metadata to marketplaces.

Installation

This project is a fastlane plugin. To get started with fastlane-plugin-flutter_version, add it to your project by adding the following lines in Gemfile:

From GitHub registry (recommended)

Install from the command line:

gem install fastlane-plugin-flutter_version --version "1.0.0" --source "https://rubygems.pkg.github.com/tianhaoz95"

Install via Gemfile:

source "https://rubygems.pkg.github.com/tianhaoz95" do
  gem "fastlane-plugin-flutter_version", "1.0.0"
end

Check out the instructions in GitHub Registry.

From RubyGems registry

Install from the command line:

gem install fastlane-plugin-flutter_version

Install via Gemfile:

gem 'fastlane-plugin-flutter_version', '~> 1.0', '>= 1.0.1'

Check out the instructions here.

Directly from Github

gem "fastlane-plugin-flutter_version", git: "https://github.com/tianhaoz95/fastlane-plugin-flutter-version"

Usage

Android example

The following example releases a Android app to Google Play Store without needing to manually specify the app version:

desc "submit to internal track in Google Play Store"
lane :internal do
  Dir.chdir "../.." do sh("flutter", "build", "appbundle", "--release") end # Call Flutter Build
  gradle(task: 'bundle', build_type: 'Release')
  upload_to_play_store(
    track: 'internal',
    version_code: flutter_version()["version_code"],
    aab: '../build/app/outputs/bundle/release/app-release.aab',
    skip_upload_screenshots: true,
    skip_upload_images: true
  )
end

The line flutter_version() fetches the version information from the pubspec.yaml file from the Flutter project and parses the version information from the file. This is convenient for continuous integration because it saves the effort for developers to keep track of version information in multiple places.

For more details, check out the example project configuration.

iOS example

The following example releases an iOS app to TestFlight without needing to manually specify the app version or build number:

desc "submit to TestFlight"
lane :internal do
  Dir.chdir "../.." do sh("flutter", "build", "ios", "--release", "--no-codesign") end # Call Flutter Build
  # https://docs.fastlane.tools/actions/increment_version_number/
  increment_version_number(
    xcodeproj: "Runner.xcodeproj",
    version_number: flutter_version()["version_name"] # Set a specific version number
  )
  # https://docs.fastlane.tools/actions/increment_build_number/
  increment_build_number(
    xcodeproj: "Runner.xcodeproj",
    build_number: flutter_version()["version_code"] # Set a specific build number
  )
  build_app(workspace: "Runner.xcworkspace", export_method: "app-store")
  upload_to_testflight
end

Available options

Name Description Optional Type Default
pubspec_location The location of the pubspec.yaml file (relative to Fastfile). For details, see here. String ../pubspec.yaml
should_omit_version_code If the version code should be omitted for projects that do not use a version code. For details, see here. Boolean false

About Fastlane

Fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.

Issues and feedback

For any other issues and feedback about this plugin, please submit it to this repository.

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting guide.

Using Fastlane plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Shun Kakinoki

💻

Tianhao Zhou

💻

davidbrenner

🤔 📖

Daniel Gomez

🤔

RtypeStudios

💬 📖

Marvin M

🤔

Muhammad Adil

📖 🐛

Leslie Arkorful

🐛 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

fastlane-plugin-flutter_version's People

Contributors

allcontributors[bot] avatar ch-muhammad-adil avatar davidbrenner avatar dependabot-preview[bot] avatar dependabot[bot] avatar lesliearkorful avatar rtypestudios avatar shunkakinoki avatar tianhaoz95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fastlane-plugin-flutter_version's Issues

Example for iOS

Hi,

I found this via your medium article. Thanks for the plugin, it looks great!

Do you have an example of how to use this for iOS?

Additionally, do you have suggestions for how to keep version numbers sync'd?

Even with CI, a number of times I've forgotten to bump the version number (even in pubspec.yaml). One option that I've considered is pulling the latest build number from the play/app store (ie: https://docs.fastlane.tools/actions/latest_testflight_build_number/) and then adding a script and/or plugin to write this back to pubspec.yaml. Is that something you'd be interested in?

Add integration tests for omitting version code

Since I don't have much time today... I've only added unit tests. It would be great if anyone can add a few more integration tests in

lane :test do
version_info = flutter_version(
pubspec_location: './example/pubspec.yaml'
)
puts version_info
# Tests if the version code retrieved from the pubspec.yaml matches
version_code = version_info['version_code']
correct_version_code = '15'
if version_code != correct_version_code
UI.user_error!(
'version_code mismatched, expect '
.concat(correct_version_code)
.concat(', got ')
.concat(version_code)
)
end
# Tests if the version name retrieved from the pubspec.yaml matches
version_name = version_info['version_name']
expected_version_name = '1.0.6'
if version_name != expected_version_name
UI.user_error!(
'version_name mismatched, expect '
.concat(expected_version_name)
.concat(', got ')
.concat(version_name)
)
end
end

Originally posted by @tianhaoz95 in #59 (comment)

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No gem API key specified.

A gem host API key must be created and set in the GEM_HOST_API_KEY environment variable on you CI environment.

You can retrieve an API key either from your ~/.gem/credentials file or in your profile in RubyGems.org.


Good luck with your project ✨

Your semantic-release bot 📦🚀

[BUG] "Read pubspec.yaml failed" on a YAML file that contains aliases on Ruby 3+

Describe the bug
"Read pubspec.yaml failed" on a YAML file that contains aliases on Linux (Fedora 38, tried using both bash and zsh). The same project works fine on macOS Ventura.

In the case of the yaml file below, the relevant alias is isar_version.

To Reproduce
Steps to reproduce the behavior:

  1. Use the pubspec.yaml file attached below
  2. Use flutter_version in android/fastlane/Fastfile
  3. Run the fastlane lane
  4. See error

Expected behavior
The YAML file should be parsed successfully.

Desktop (please complete the following information):

  • OS: Fedora 38
  • Shell: zsh
  • flutter_version version: 1.1.15

Additional context
YAML file:

name: app
description: App client app

publish_to: "none"

version: 1.1.2+33

environment:
  sdk: ">=3.0.0 <4.0.0"

isar_version: &isar_version 3.1.0+1
dependencies:
  another_flushbar: ^1.12.30
  asn1lib: ^1.4.1
  auto_route: ^7.4.0
  auto_size_text: ^3.0.0
  background_locator_2: ^2.0.6
  clock: ^1.1.1
  collection: ^1.17.1
  convenient_test: ^1.2.1
  cupertino_icons: ^1.0.5
  dartz: ^0.10.1
  dio: ^5.2.1+1
  dio_http2_adapter: ^2.3.0
  dio_smart_retry: ^5.0.0
  easy_localization: ^3.0.2
  fast_rsa: ^3.5.7
  flutter:
    sdk: flutter
  flutter_blurhash: ^0.7.0
  flutter_carousel_widget: ^2.0.4
  flutter_dialogs: ^3.0.0
  flutter_dotenv: ^5.1.0
  flutter_hooks: ^0.20.0
  flutter_image_compress: ^2.0.3
  flutter_map: ^5.0.0
  flutter_map_animations: ^0.4.0
  flutter_map_location_marker: ^7.0.0
  # TODO: Use version once plugin is updated to support Flutter Map v5 ( https://github.com/lpongetti/flutter_map_marker_cluster )
  flutter_map_marker_cluster:
    git:
      url: https://github.com/andreystavitsky/flutter_map_marker_cluster.git
      ref: master
  flutter_map_tile_caching: ^9.0.0-dev.3
  flutter_secure_storage: ^8.0.0
  flutter_svg: ^2.0.7
  freezed_annotation: ^2.2.0
  geolocator: ^9.0.2
  hooks_riverpod: ^2.3.6
  http_parser: ^4.0.2
  image_picker: ^1.0.0
  infinite_scroll_pagination: ^3.2.0
  isar: *isar_version
  isar_flutter_libs: *isar_version
  json_annotation: ^4.8.1
  jwt_decoder: ^2.0.1
  latlong2: ^0.9.0
  logger: ^2.0.1
  onesignal_flutter: ^3.5.0
  open_mail_app: ^0.4.5
  package_info_plus: ^4.0.2
  path_provider: ^2.0.15
  permission_handler: ^10.3.0
  pointycastle: ^3.7.3
  pretty_dio_logger: ^1.3.1
  restart_app: ^1.2.1
  retrofit: ^4.0.1
  riverpod_annotation: ^2.1.1
  sentry_dio: ^7.8.0
  sentry_flutter: ^7.8.0
  shared_preferences: ^2.1.2
  shimmer: ^3.0.0
  sliver_tools: ^0.2.10
  socket_io_client: ^2.0.2
  stack_trace: ^1.11.0
  timeago: ^3.3.0
  transparent_pointer: ^1.0.0
  tuple: ^2.0.2
  url_launcher: ^6.1.11
  visibility_detector: ^0.4.0+2
  web_socket_channel: ^2.4.0

dev_dependencies:
  auto_route_generator: ^7.1.1
  build_runner: ^2.4.4
  convenient_test_dev: ^1.3.0
  custom_lint: ^0.4.0
  darq: ^2.0.0
  flutter_flavorizr: ^2.2.1
  flutter_launcher_icons: ^0.13.1
  flutter_native_splash: ^2.3.1
  flutter_test:
    sdk: flutter
  freezed: ^2.3.4
  integration_test:
    sdk: flutter
  isar_generator: *isar_version
  json_serializable: ^6.7.0
  mockito: ^5.4.1
  retrofit_generator: ^7.0.2
  riverpod_generator: ^2.2.3
  riverpod_lint: ^1.4.0
  sentry_dart_plugin: ^1.0.0
  surf_lint_rules: ^3.0.0

Error log:

/home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-plugin-flutter_version-1.1.15/lib/fastlane/plugin/flutter_version/actions/flutter_version_action.rb:18:in `rescue in run': \e[31m[!] Read pubspec.yaml failed\e[0m (RuntimeError)
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-plugin-flutter_version-1.1.15/lib/fastlane/plugin/flutter_version/actions/flutter_version_action.rb:14:in `run'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
        from Fastfile:49:in `block (2 levels) in parsing_binding'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/lane.rb:33:in `call'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/bin/fastlane:23:in `<top (required)>'
        from /home/alex/.rbenv/versions/3.1.2/bin/fastlane:25:in `load'
        from /home/alex/.rbenv/versions/3.1.2/bin/fastlane:25:in `<top (required)>'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:58:in `load'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:58:in `kernel_load'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:23:in `run'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/cli.rb:492:in `exec'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/cli.rb:34:in `dispatch'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/cli.rb:28:in `start'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/exe/bundle:45:in `block in <top (required)>'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/exe/bundle:33:in `<top (required)>'
        from /home/alex/.rbenv/versions/3.1.2/bin/bundle:25:in `load'
        from /home/alex/.rbenv/versions/3.1.2/bin/bundle:25:in `<main>'
/home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:430:in `visit_Psych_Nodes_Alias': Unknown alias: isar_version (Psych::BadAlias)
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `each_slice'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343:in `revive_hash'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:318:in `visit_Psych_Nodes_Document'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:335:in `safe_load'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:370:in `load'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:671:in `block in load_file'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:670:in `open'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:670:in `load_file'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-plugin-flutter_version-1.1.15/lib/fastlane/plugin/flutter_version/actions/flutter_version_action.rb:15:in `run'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
        from Fastfile:49:in `block (2 levels) in parsing_binding'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/lane.rb:33:in `call'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/fastlane-2.214.0/bin/fastlane:23:in `<top (required)>'
        from /home/alex/.rbenv/versions/3.1.2/bin/fastlane:25:in `load'
        from /home/alex/.rbenv/versions/3.1.2/bin/fastlane:25:in `<top (required)>'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:58:in `load'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:58:in `kernel_load'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:23:in `run'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/cli.rb:492:in `exec'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/cli.rb:34:in `dispatch'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/cli.rb:28:in `start'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/exe/bundle:45:in `block in <top (required)>'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
        from /home/alex/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.4.10/exe/bundle:33:in `<top (required)>'
        from /home/alex/.rbenv/versions/3.1.2/bin/bundle:25:in `load'
        from /home/alex/.rbenv/versions/3.1.2/bin/bundle:25:in `<main>'

Example for the "Available options"

It would be nice to have a example for the "Available options", how to use them and for the pubspec_location which is the starting point.

add linter check

The CI should check if all code is properly formatted before merging.

The code should go into .github/workflows/sentry.yml as a step and uses rufo as the formatter.

[BUG] user_error: Could not find action, lane or variable flutter_version: method_missing

🐛 Describe the bug

  • fastlane fails to get the version using the tutorial in our app...
bundle exec fastlane upload_to_play_store_internal --verbose
  • The error is as follows:
from /usr/local/bundle/bin/bundle:23:in `<main>'
/usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in 
`user_error!': Could not find action, lane or variable 'flutter_version'. Check out the documentation
 for more details: https://docs.fastlane.tools/actions (FastlaneCore::Interface::FastlaneError)
from /usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in 
`method_missing'

🦺 To Reproduce

  1. Installed the gem from Rubygems
gem install fastlane-plugin-flutter_version
  • It shows the success message with the latest version
Successfully installed fastlane-plugin-flutter_version-1.1.12
1 gem installed
  1. Available fastlane actions DOES NOT list the flutter version as an action
 bundle exec fastlane actions
app-deploy-internal_1      | [19:01:05]: Sending anonymous analytics information
app-deploy-internal_1      | [19:01:05]: Learn more at https://docs.fastlane.tools/#metrics
app-deploy-internal_1      | [19:01:05]: No personal or sensitive data is sent.
app-deploy-internal_1      | [19:01:05]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
app-deploy-internal_1      | +------------------------+-------------------------+------------------+
app-deploy-internal_1      | |                     Available fastlane actions                      |
app-deploy-internal_1      | +------------------------+-------------------------+------------------+
app-deploy-internal_1      | | Action                 | Description             | Author           |
app-deploy-internal_1      | +------------------------+-------------------------+------------------+
app-deploy-internal_1      | | adb                    | Run ADB Actions         | hjanuschka       |
app-deploy-internal_1      | | adb_devices            | Get an array of         | hjanuschka       |
app-deploy-internal_1      | |                        | Connected android       |                  |
app-deploy-internal_1      | |                        | device serials          |                  |
app-deploy-internal_1      | | add_extra_platforms    | Modify the default      | lacostej         |
...
....

🔠 Additional context

Source

  • The code is similar to the examples posted
 25   desc "Submits the APK to Google Play alpha testing track"
 26   lane :upload_to_play_store_internal do
 27     languages.each { |languageCode| prepareTestingChangelogs(languageCode)}
 28     upload_to_play_store(
 29       track: 'internal',
 30       version_code: flutter_version()["version_code"],
 31       aab: '../build/app/outputs/bundle/release/app-release.aab',
 32       skip_upload_screenshots: true,
 33       skip_upload_images: true
 34     )
 35   end

💻 Settings

$ docker run -ti supercash/flutter-mobile-app gem --version
3.1.6

$ docker run -ti supercash/flutter-mobile-app ruby --version
ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-linux]

$ docker run -ti supercash/flutter-mobile-app flutter doctor
app-deploy-internal_1      | INFO: Flutter env
app-deploy-internal_1      | [✓] Flutter (Channel unknown, 1.23.0-18.1.pre, on Linux, locale C.UTF-8)
app-deploy-internal_1      |     • Flutter version 1.23.0-18.1.pre at /home/supercash/flutter
app-deploy-internal_1      |     • Framework revision 198df796aa (9 months ago), 2020-10-15 12:04:33 -0700
app-deploy-internal_1      |     • Engine revision 1d12d82d9c
app-deploy-internal_1      |     • Dart version 2.11.0 (build 2.11.0-213.1.beta)

$ docker run -ti supercash/flutter-mobile-app bundler --version
Bundler version 2.2.21

$ docker run -ti supercash/flutter-mobile-app fastlane --version
fastlane installation at path:
/usr/local/bundle/gems/fastlane-2.187.0/bin/fastlane
-----------------------------
[✔] 🚀
fastlane 2.187.0

🔉 Logs

app-deploy-internal_1      | /usr/local/bundle/bin/bundle:23:in `<main>'
app-deploy-internal_1      | WARN [2021-07-01 19:01:13.62]: Lane Context:
app-deploy-internal_1      | INFO [2021-07-01 19:01:13.62]: {:DEFAULT_PLATFORM=>:android, :PLATFORM_NAME=>:android, :LANE_NAME=>"android upload_to_play_store_internal"}
app-deploy-internal_1      | ERROR [2021-07-01 19:01:13.62]: Could not find action, lane or variable 'flutter_version'. Check out the documentation for more details: https://docs.fastlane.tools/actions
app-deploy-internal_1      | INFO [2021-07-01 19:01:13.63]: Successfully generated documentation at path '/supercash-mobile/android/fastlane/README.md'
app-deploy-internal_1      |
app-deploy-internal_1      | +------+------------------+-------------+
app-deploy-internal_1      | |           fastlane summary            |
app-deploy-internal_1      | +------+------------------+-------------+
app-deploy-internal_1      | | Step | Action           | Time (in s) |
app-deploy-internal_1      | +------+------------------+-------------+
app-deploy-internal_1      | | 1    | update_fastlane  | 4           |
app-deploy-internal_1      | | 2    | default_platform | 0           |
app-deploy-internal_1      | +------+------------------+-------------+
app-deploy-internal_1      |
app-deploy-internal_1      | ERROR [2021-07-01 19:01:13.65]: fastlane finished with errors
app-deploy-internal_1      | bundler: failed to load command: fastlane (/usr/local/bundle/bin/fastlane)
app-deploy-internal_1      | /usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!': \e[31m[!] Could not find action, lane or variable 'flutter_version'. Check out the documentation for more details: https://docs.fastlane.tools/actions\e[0m (FastlaneCore::Interface::FastlaneError)
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:174:in `trigger_action_by_name'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
app-deploy-internal_1      | 	from Fastfile:30:in `block (2 levels) in parsing_binding'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/lane.rb:33:in `call'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/commands_generator.rb:109:in `block (2 levels) in run'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/commands_generator.rb:353:in `run'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in `take_off'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/bin/fastlane:23:in `<top (required)>'
app-deploy-internal_1      | 	from /usr/local/bundle/bin/fastlane:23:in `load'
app-deploy-internal_1      | 	from /usr/local/bundle/bin/fastlane:23:in `<top (required)>'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli/exec.rb:63:in `load'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli/exec.rb:63:in `kernel_load'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli/exec.rb:28:in `run'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli.rb:474:in `exec'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli.rb:30:in `dispatch'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli.rb:24:in `start'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/exe/bundle:49:in `block in <top (required)>'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/exe/bundle:37:in `<top (required)>'
app-deploy-internal_1      | 	from /usr/local/bundle/bin/bundle:23:in `load'
app-deploy-internal_1      | 	from /usr/local/bundle/bin/bundle:23:in `<main>'
app-deploy-internal_1      | /usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in `user_error!': Could not find action, lane or variable 'flutter_version'. Check out the documentation for more details: https://docs.fastlane.tools/actions (FastlaneCore::Interface::FastlaneError)
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:174:in `trigger_action_by_name'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
app-deploy-internal_1      | 	from Fastfile:30:in `block (2 levels) in parsing_binding'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/lane.rb:33:in `call'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/commands_generator.rb:109:in `block (2 levels) in run'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/commands_generator.rb:353:in `run'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in `take_off'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/fastlane-2.187.0/bin/fastlane:23:in `<top (required)>'
app-deploy-internal_1      | 	from /usr/local/bundle/bin/fastlane:23:in `load'
app-deploy-internal_1      | 	from /usr/local/bundle/bin/fastlane:23:in `<top (required)>'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli/exec.rb:63:in `load'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli/exec.rb:63:in `kernel_load'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli/exec.rb:28:in `run'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli.rb:474:in `exec'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli.rb:30:in `dispatch'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/cli.rb:24:in `start'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/exe/bundle:49:in `block in <top (required)>'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
app-deploy-internal_1      | 	from /usr/local/bundle/gems/bundler-2.2.21/exe/bundle:37:in `<top (required)>'
app-deploy-internal_1      | 	from /usr/local/bundle/bin/bundle:23:in `load'
app-deploy-internal_1      | 	from /usr/local/bundle/bin/bundle:23:in `<main>'

❓ Questions

  • Is there any workaround to this problem? I'm really interested in using your plugin
  • Is there any info you need to debug the problem?

Use correct iOS build command in README

The iOS build command in the README is apparently android's.
Dir.chdir "../.." do sh("flutter", "build", "appbundle", "--release") end # Call Flutter Build

This is what the Flutter website suggests for Fastlane
Dir.chdir "../.." do sh("flutter", "build", "ios", "--release", "--codesign") end # Call Flutter Build
Source: https://flutter.dev/docs/deployment/cd

[BUG] Version code is not optional

I have the version like:

version: 1.2

But it fails saying:

[07:45:58]: The full version is: 0.3.2
[07:45:58]: Verson code indicator (+) not found in pubspec.yml

gradlew file missing

When using the fastlane-plugin-flutter_version plugin with the below fastlane file:

desc "Submit a new Build"
lane :build do

  gradle(
    task: "bundle",
    build_type: "Release",
  )
end

I get the error:

Couldn't find gradlew at path '/Users/appveyor/projects/experimental/demo/android/gradlew'

And sure enough the gradlew is missing from the repo. But that is because a lot of git ignore files seem to suggest you should be excluding the gradlew file in source control and that it should be generated by flutter.

Example of an ignore file excluding it: https://gist.github.com/Cheesetouched/ace446b9e6bedef76eb4fb7afb1ea164

A solution I came up with is to call flutter and the causes the gradlew to be created:

Dir.chdir "../.." do
   sh("flutter", "build", "appbundle", "--release")
end

But shouldn't the plugin do that automatically? Or am I missing something? (most likely :))

[FEAT] Add legacy tests

Now that I decided to move forward a bit to clean up the implementation, it's important to maintain backward compatibility as much as possible, so adding a series of legacy functionality tests will be good (not sure when I will have time to do that tho...)

Syntax Error: There is this problem while running the fastlane LANE command

[12:10:49]:     34:         end
[12:10:49]:     35:         lane :dev do
[12:10:49]:  => 36:             Dir.chdir "../.." {sh("flutter", "build", "ios", "--release", "--no-codesign")}
[12:10:49]:     37:             increment_version_number(
[12:10:49]:     38:                 xcodeproj: "Runner.xcodeproj",

[!] Syntax error in your Fastfile on line 36: Fastfile:36: syntax error, unexpected '{', expecting end
        Dir.chdir "../.." {sh("flutter", "build", "ios",...
                          ^
Fastfile:36: syntax error, unexpected '}', expecting end
... "--release", "--no-codesign")}
...                              ^
Fastfile:56: syntax error, unexpected end, expecting end-of-input
    end
    ^~~

Looks like this one is not Dir.chdir "../.." {sh("flutter", "build", "ios", "--release", "--no-codesign")} appropriate . Please help as soon as possible.

[FEAT] add dependabot for github actions

Just took a look after not touching the github action workflows and found that they are pretty outdated. Now that dependabot supports updating github actions, should add it to make life easier.

Unable to install

Describe the bug

  1. Installation using
    gem install fastlane-plugin-flutter_version --version "1.0.0" --source "https://rubygems.pkg.github.com/tianhaoz95"

results in

bad response Unauthorized 401 (https://rubygems.pkg.github.com/tianhaoz95/specs.4.8.gz)

  1. Installing using gem install fastlane-plugin-flutter_version succeeds but when used in fastlane file, I get Could not find action, lane or variable 'flutter_version'.

Awesome work to solve the problem though!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.