Book Image

Continuous Delivery for Mobile with fastlane

By : Doron Katz
Book Image

Continuous Delivery for Mobile with fastlane

By: Doron Katz

Overview of this book

Competitive mobile apps depend strongly on the development team’s ability to deliver successful releases, consistently and often. Although continuous integration took a more mainstream priority among the development industry, companies are starting to realize the importance of continuity beyond integration and testing. This book starts off with a brief introduction to fastlane—a robust command-line tool that enables iOS and Android developers to automate their releasing workflow. The book then explores and guides you through all of its features and utilities; it provides the reader a comprehensive understanding of the tool and how to implement them. Themes include setting up and managing your certificates and provisioning and push notification profiles; automating the creation of apps and managing the app metadata on iTunes Connect and the Apple Developer Portal; and building, distributing and publishing your apps to the App Store. You will also learn how to automate the generation of localized screenshots and mesh your continuous delivery workflow into a continuous integration workflow for a more robust setup. By the end of the book, you will gain substantial knowledge on delivering bug free, developer-independent, and stable application release cycle.
Table of Contents (27 chapters)
Title Page
Dedication
www.PacktPub.com
Foreword
Contributors
Preface
Index

Calling bash commands using fastlane


If for some reason you need to call a specific command that is not available in the current fastlane library, you have two options. Ideally, if what you need to do would be useful for the general public, create your own action/plugin, as long as it's appealing and generic enough for other developers. If it's a very specific action, fastlane lets you run specific shell sh commands as if you were in the Command Prompt yourself.

Running a shell command is as simple as adding it to your lane, with an action similar to the following:

...
sh(“git add ./screenshots")
...
sh("git commit -m:’Specific update text’”) 
..
sh "bash ./script.sh"

It's quite versatile. As you can see, you are able to interact with your bash shell directly from within fastlane, calling specific shell scripts that you've created, as part of your workflow. In subsequent chapters, we are going to add even more advanced actions, as well as our own crafted action plugin, but, as for what we've...