react-native-build-manager

1.4.2 • Public • Published

npm GitHub

Introduction

This package delivers a CLI command manage-build which handles the whole building process for you. More specifically, it takes care of versioning, bundling and building the APK or AAB.

🤖 Android only (for now)

Contents

Installation

In order to install the package, simply use:

npm install react-native-build-manager

or

yarn add react-native-build-manager

Use

Getting started

The process of using the command is pretty straightforward.

npx manage-build --[flag(s)]

On the first run, a configuration file will be created in ./build-manager. It currently only stores whether you are using it in an (ejected) expo project or not. This is used to update the app.json -in the case of an expo project- to ensure consistency.

Output: The APK will be found in ./android/app/build/outputs/apk/release


Flags

Flag Alias Description Default
help - Show the command's help -
version -v Show the package's version -
output -o Predefines what kind of build type you are going for -
same-version - Predefines if the version will stay the same false

Configuration

As mentioned earlier, on the first run, you will be asked extra questions to create the right configuration. Currently, the configuration only requires to know whether you are using the command in an ejected (bare workflow) expo app or not.

Note: The configuration can be manually edited in case of mistake during the setup by editing the ./build-manager/config.json file.


Steps

Preview of the script in action
Preview of the command's use
(I was too lazy to set up an example project for it, but I've tested it on my own private project. Have to take my word for it, I guess 🤷‍♂️ )

  1. You specify if you want to increment your version or not. If you chose to increment it, you have the choice of making your new version a major, minor or patch version. (more info @ versioning)
  2. You are asked if you want your versionCode (more info @ versioning) incremented.
  3. The new versions are printed on the console.
  4. You are what kind of build you want:
    • Debug APK: An unsigned .apk that can only be used for debugging purposes. This .apk can not be uploaded to Google Play Console.
    • Release APK: A signed .apk that can be used for testing your release and be uploaded to Google Play Console.
    • Release AAB: A signed .aab whose only purpose is to be uploaded to Google Play Console.
    • Release APK and AAB: Self-explanatory.
  5. You are asked to confirm your input (not shown above .gif).

Versioning

You will be asked about the versioning. You are given the choice to increment as you think (major, minor, patch) or not increment the version name* at all. You will also be asked about whether or not to increment the version code*.

Version Name: This is the version the user will see. The package only supports the most widely used versioning convention. Semantic Versioning 2.0.0.

Version Code: This is the version Google Play Console uses to determine whether a new version is uploaded and if the user needs to update their application. It is not possible to upload to APK/AAB files with the same version code.

> For more detailed information: https://developer.android.com/studio/publish/versioning

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-build-manager

Weekly Downloads

1

Version

1.4.2

License

MIT

Unpacked Size

72.1 kB

Total Files

34

Last publish

Collaborators

  • tryphonx