refactor(with-postpublish-hooks): upgrade to sdk 37

This commit is contained in:
Cedric van Putten
2020-04-22 17:33:55 +02:00
parent 628f8c6120
commit 1e342eb863
4 changed files with 20 additions and 5550 deletions

View File

@@ -1,16 +1,21 @@
# postPublish hooks # Post Publish Hooks Example
## How to use <p>
<!-- iOS -->
<img alt="Supports Expo iOS" longdesc="Supports Expo iOS" src="https://img.shields.io/badge/iOS-4630EB.svg?style=flat-square&logo=APPLE&labelColor=999999&logoColor=fff" />
<!-- Android -->
<img alt="Supports Expo Android" longdesc="Supports Expo Android" src="https://img.shields.io/badge/Android-4630EB.svg?style=flat-square&logo=ANDROID&labelColor=A4C639&logoColor=fff" />
</p>
## Configure it It's common to need to perform a set of tasks once you publish an update to your project. For example, you may want to notify people on Twitter or Slack, upload sourcemaps and cut a release on Sentry, etc. This example demonstrates how you can write your own simple hooks with `./hooks/echo.js`, and install and use hooks distributed through npm, such as `expo-prepublish-slack-notify`.
## 🚀 How to use
#### Configure it
- Create an incoming webhook for your Slack server and replace `https://hooks.slack.com/put-your-stuff-here` in `app.json` with your webhook url -- or remove the `expo-postpublish-slack-notify` hook entirely from `app.json`. - Create an incoming webhook for your Slack server and replace `https://hooks.slack.com/put-your-stuff-here` in `app.json` with your webhook url -- or remove the `expo-postpublish-slack-notify` hook entirely from `app.json`.
## Running the app #### Running the app
- Run `yarn` or `npm install` - Run `yarn` or `npm install`
- Run [`expo start`](https://docs.expo.io/versions/latest/workflow/expo-cli/), try it out. - Run [`expo start`](https://docs.expo.io/versions/latest/workflow/expo-cli/), try it out.
## The idea behind the example
It's common to need to perform a set of tasks once you publish an update to your project. For example, you may want to notify people on Twitter or Slack, upload sourcemaps and cut a release on Sentry, etc. This example demonstrates how you can write your own simple hooks with `./hooks/echo.js`, and install and use hooks distributed through npm, such as `expo-prepublish-slack-notify`.

View File

@@ -2,11 +2,7 @@
"expo": { "expo": {
"name": "with-postpublish-hooks", "name": "with-postpublish-hooks",
"slug": "with-postpublish-hooks", "slug": "with-postpublish-hooks",
"description": "Demo project with postPublish hooks. The actual app itself is empty, the interesting part is in the hooks configuration in app.json",
"privacy": "unlisted",
"sdkVersion": "35.0.0",
"version": "1.0.0", "version": "1.0.0",
"orientation": "portrait",
"hooks": { "hooks": {
"postPublish": [ "postPublish": [
{ {
@@ -22,10 +18,6 @@
} }
} }
] ]
}, }
"platforms": [
"android",
"ios"
]
} }
} }

View File

@@ -1,16 +1,11 @@
{ {
"name": "with-postpublish-hooks",
"version": "1.0.0",
"description": "An example of how to use post-publishing hooks",
"author": "support@expo.io",
"private": true,
"dependencies": { "dependencies": {
"expo": "^35.0.0", "expo": "37.0.7",
"expo-postpublish-slack-notify": "^1.2.0", "expo-postpublish-slack-notify": "1.2.0",
"react": "16.8.3", "react": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz" "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz"
}, },
"devDependencies": { "devDependencies": {
"babel-preset-expo": "^7.0.0" "babel-preset-expo": "8.1.0"
} }
} }

File diff suppressed because it is too large Load Diff