···168168 header: pull-request-eas-build-${{ github.sha }}
169169 number: ${{ github.event.issue.number }}
170170 message: |
171171- Your requested OTA deployment was successful! You may now apply it by pressing the link below.
172172-173173- [Apply OTA update](bluesky://intent/apply-ota?channel=pull-request-${{ github.event.issue.number }})
171171+ Your requested OTA deployment was successful! You may now apply it by opening the deep link below in your browser:
174172175175- [Here is some music to listen to while you wait...](https://www.youtube.com/watch?v=VBlFHuCzPgY)
173173+ `bluesky://intent/apply-ota?channel=pull-request-${{ github.event.issue.number }}`
176174 ---
177175 *Generated by [PR labeler](https://github.com/expo/expo/actions/workflows/pr-labeler.yml) 🤖*
178176
···4545 const res = await checkForUpdateAsync()
4646 if (res.isAvailable) {
4747 await fetchUpdateAsync()
4848-4948 Alert.alert(
5049 'Update Available',
5150 'A new version of the app is available. Relaunch now?',
···7069 const {currentlyRunning} = useUpdates()
7170 const [pending, setPending] = React.useState(false)
7271 const currentChannel = currentlyRunning?.channel
7373- const isCurrentlyRunningPullRequestDeployment =
7474- currentChannel?.startsWith('pull-request')
75727673 const tryApplyUpdate = async (channel: string) => {
7774 setPending(true)
7878- if (currentChannel === channel) {
7979- const res = await checkForUpdateAsync()
8080- if (res.isAvailable) {
8181- logger.debug('Attempting to fetch update...')
8282- await fetchUpdateAsync()
8383- Alert.alert(
8484- 'Deployment Available',
8585- `A new deployment of ${channel} is availalble. Relaunch now?`,
8686- [
8787- {
8888- text: 'No',
8989- style: 'cancel',
7575+ await setExtraParamsPullRequest(channel)
7676+ const res = await checkForUpdateAsync()
7777+ if (res.isAvailable) {
7878+ Alert.alert(
7979+ 'Deployment Available',
8080+ `A deployment of ${channel} is availalble. Applying this deployment may result in a bricked installation, in which case you will need to reinstall the app and may lose local data. Are you sure you want to proceed?`,
8181+ [
8282+ {
8383+ text: 'No',
8484+ style: 'cancel',
8585+ },
8686+ {
8787+ text: 'Relaunch',
8888+ style: 'default',
8989+ onPress: async () => {
9090+ await fetchUpdateAsync()
9191+ await reloadAsync()
9092 },
9191- {
9292- text: 'Relaunch',
9393- style: 'default',
9494- onPress: async () => {
9595- await reloadAsync()
9696- },
9797- },
9898- ],
9999- )
100100- } else {
101101- Alert.alert(
102102- 'No Deployment Available',
103103- `No new deployments of ${channel} are currently available for your current native build.`,
104104- )
105105- }
9393+ },
9494+ ],
9595+ )
10696 } else {
107107- setExtraParamsPullRequest(channel)
108108- const res = await checkForUpdateAsync()
109109- if (res.isAvailable) {
110110- Alert.alert(
111111- 'Deployment Available',
112112- `A deployment of ${channel} is availalble. Applying this deployment may result in a bricked installation, in which case you will need to reinstall the app and may lose local data. Are you sure you want to proceed?`,
113113- [
114114- {
115115- text: 'No',
116116- style: 'cancel',
117117- },
118118- {
119119- text: 'Relaunch',
120120- style: 'default',
121121- onPress: async () => {
122122- await reloadAsync()
123123- },
124124- },
125125- ],
126126- )
127127- } else {
128128- Alert.alert(
129129- 'No Deployment Available',
130130- `No new deployments of ${channel} are currently available for your current native build.`,
131131- )
132132- }
9797+ Alert.alert(
9898+ 'No Deployment Available',
9999+ `No new deployments of ${channel} are currently available for your current native build.`,
100100+ )
133101 }
134102 setPending(false)
135103 }
···146114 tryApplyUpdate,
147115 revertToEmbedded,
148116 currentChannel,
149149- isCurrentlyRunningPullRequestDeployment,
150117 pending,
151118 }
152119}