0.0.33-staging • Published 11 months ago

expo-updates-client v0.0.33-staging

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

expo-updates-client CLI

Description

This is a CLI tool that helps you to upload and rollback your Expo Updates to custom servers using expo-updates-server. Set up your own custom server by following the instructions in the expo-updates-server package.

original author : Glency Tirao

Features

  • Upload and Rollback your Expo Updates to custom servers in a single command.

Installation

For NPM users:

npm install -g expo-updates-client

For Yarn users:

yarn global add expo-updates-client

Usage

First, if your Expo project is still using app.json, you need to migrate it to app.config.[js|ts].

Then, you need to add the following code to your app.config.js:

const EXPO_UPDATES_KEY = process.env.EXPO_UPDATES_KEY || "";

module.exports = {
  expo: {
    // ...
    updates: {
      url: "http://<link-to-custom-server>/ota/manifest",
      enabled: true,
      fallbackToCacheTimeout: 30000,
      requestHeaders: {
        "x-expo-updates-key": EXPO_UPDATES_KEY,
      },
    },
    runtimeVersion: { policy: "appVersion" },
    // ...
  },
};

Replace <link-to-custom-server> with the link to your custom server.

Then, you need to set the EXPO_UPDATES_KEY environment variable in your .env file:

EXPO_UPDATES_KEY=<your-expo-updates-key>

Replace <your-expo-updates-key> with any random string. This key will be used to reference your Expo Updates in the custom server. Generate a random string using the following command:

node -e "console.log(require('crypto').randomBytes(16).toString('hex'))"

This is useful when you have multiple Environments (e.g. Development, Staging, Production) and you want to upload your Expo Updates to different servers.

After setting up, you can run the following command to upload your Expo Updates to the custom server:

expo-updates-client release --platform [android|ios] --token <your-custom-server-auth-token>

Replace [android|ios] with the platform you want to upload the Expo Updates to. Replace <your-custom-server-auth-token> with the auth token of your custom server. Read about how to get your auth token for your custom server using the expo-updates-server package. Authorization Token

You can also run the following command to rollback your Expo Updates to the custom server:

# Rollback to the previous release
expo-updates-client rollback --platform [android|ios] --token <your-custom-server-auth-token>
# Rollback to embedded release
expo-updates-client rollback --platform [android|ios] --token <your-custom-server-auth-token> --embedded
# Release a new update
expo-updates-client release --platform [android|ios] --token <your-custom-server-auth-token>

# Rollback to the previous release
expo-updates-client rollback --platform [android|ios] --token <your-custom-server-auth-token>

# Rollback to embedded release
expo-updates-client rollback --platform [android|ios] --token <your-custom-server-auth-token> --embedded

Multiple Environments

If you have multiple Environments (e.g. Development, Staging, Production), create one key for each Environment and set the EXPO_UPDATES_KEY environment variable in your .env file:

Roadmap

  • Unit Tests

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

If you have any questions, please feel free open an issue.

0.0.33-staging

11 months ago

0.0.30-staging

11 months ago

0.0.31-staging

11 months ago

0.0.32-staging

11 months ago

0.0.29-staging

11 months ago

0.0.27-staging

11 months ago

0.0.26-staging

11 months ago

0.0.25-staging

11 months ago

0.0.24-staging

11 months ago

0.0.23-staging

11 months ago

0.0.22-staging

11 months ago

0.0.21-staging

11 months ago

0.0.20-staging

11 months ago

0.0.19-staging

11 months ago

0.0.18-staging

11 months ago

0.0.17-staging

11 months ago

0.0.16-staging

11 months ago

0.0.15-staging

11 months ago

0.0.14-staging

11 months ago

0.0.13-staging

11 months ago

0.0.12-staging

11 months ago

0.0.11-staging

11 months ago

0.0.10-staging

11 months ago

0.0.9-staging

11 months ago

0.0.8-staging

11 months ago

0.0.7-staging

11 months ago

0.0.6-staging

11 months ago

0.0.5-staging

12 months ago

0.0.4-staging

12 months ago

0.0.3-staging

12 months ago

0.0.2-staging

12 months ago

0.0.1-staging

12 months ago