• Stars
    star
    107
  • Rank 322,430 (Top 7 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 4 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Fastlane plugin to retrieve version code for Flutter projects.

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!

More Repositories

1

photochat

Works cool: I use a secure app to chat. Next level: I encrypt my chats with a private key. Intergalactic level: I encrypt my chats with a one-time token and then make them deceptively public ;)
Dart
42
star
2

iwfp

A utility (Android/iOS/web) app to help maximize your credit card cashback rewards with math and magic. May the five percent be with you ;)
Dart
26
star
3

readable-readme

If README is not readable, nothing else will be. A linter/proofread CI for READMEs built with GitHub Actions. It's naive for now, but let's make it better together ;)
JavaScript
21
star
4

update-flutter-packages

Automated Flutter dependency package update with GitHub Actions ;)
JavaScript
20
star
5

check-group

Bundle CI checks base on sub-projects 🐈 🐈 🐈
TypeScript
19
star
6

approveman

A GitHub App that automatically approve specified changes.
TypeScript
17
star
7

developer-note

There are always things that are so simple yet so damn hard to find. However, worry not :)
HTML
10
star
8

flutter-rock-paper-scissors

Play rock paper scissors with a Flutter app. Why not?
Dart
3
star
9

tianhaoz-flutter

Centralized Flutter package repository used across side projects with personal website used as testing application.
Dart
3
star
10

js-actions-dependency-updater

Automate dependency update for JS GitHub Actions ;)
JavaScript
3
star
11

monorepo-actions

A collection of actions made for monorepo projects πŸ’‘πŸ’‘πŸ’‘
TypeScript
3
star
12

tianhaoz95.github.io

The top-level GitHub profile that with pointers to projects, contact information and blog posts 🍰🍰🍰
JavaScript
3
star
13

mirror-action

An action to check if the content of 2 files are the same.
Shell
3
star
14

gaas

Jupyter Notebook
2
star
15

cs260proj

A meme way to break the social echo chamber
JavaScript
2
star
16

scratchpad

1
star
17

resume

JavaScript
1
star
18

word_embedding

Jupyter Notebook
1
star
19

peanut_launcher

We aim to make launching for ROS project less painful
Python
1
star
20

flutter-gitpod-hacks

Demos how you can visually test your Flutter app in Gitpod
Dart
1
star
21

pics

a place to host all my pictures
HTML
1
star
22

cs289proj

final project for cs289
Jupyter Notebook
1
star
23

coolDotfiles

For EECS 398 homework 10
Shell
1
star
24

codeNboba

Personal site. What's better to describe myself than code & boba?
1
star
25

Machine-learning-using-bagging-and-K-mean

Small machine learning experiments
Python
1
star
26

CoolRobot

JavaScript
1
star
27

ultron

The reinforcement learning projects collection.
Jupyter Notebook
1
star