Giter Club home page Giter Club logo

fastlane-plugin-increment_flutter_version's Introduction

flutter_version 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)

Check out the instructions here.

From gem registry

Check out the instructions here.

Directly from Github

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

About flutter_version

A plugin to retrieve versioning information for Flutter projects.

Example

Android

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
  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

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
  # 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

For developers

Install dependencies

bundle install

If the command above complains about permission issue, use:

sudo bundle install --path ./vendor/bundle

Run tests for this plugin

To run both the tests, and code style validation, run

bunlde exec rake

To automatically fix many of the styling issues, use

bundle exec rake rubocop:auto_correct -a

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.

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.

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Shun Kakinoki

๐Ÿ’ป

Tianhao Zhou

๐Ÿ’ป

davidbrenner

๐Ÿค” ๐Ÿ“–

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

fastlane-plugin-increment_flutter_version's People

Contributors

allcontributors[bot] avatar davidbrenner avatar dependabot-preview[bot] avatar fzyzcjy avatar shunkakinoki avatar tianhaoz95 avatar

Watchers

 avatar

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.