Skip to content

Commit 95b8680

Browse files
riderxicarusdust
andauthored
Revise Capgo integration and Codemagic configuration (#3315)
* Revise Capgo integration and Codemagic configuration Updated Capgo integration instructions to include automatic and manual modes for configuration. Modified scripts for Codemagic to reflect changes in the upload process. * Update capgo-integration.md * Update capgo-integration.md --------- Co-authored-by: Nihal Agazade <43378371+icarusdust@users.noreply.github.com>
1 parent a75da0e commit 95b8680

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

content/integrations/capgo-integration.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,27 @@ In order to get live updates in your Capgo account via Codemagic, you need to co
3434

3535
### Configure your project
3636

37-
1. Modify your Capacitor project by adding the following in your **capacitor.config.json**
37+
There are two ways of configuring your Capacitor project with Capgo: automatic and manual.
38+
39+
#### Automatic mode
40+
41+
Enable it by running the following command with your CAPGO_TOKEN:
42+
43+
`npx @capgo/cli init [CAPGO_TOKEN]`
44+
45+
#### Manual mode
46+
47+
1. Add the Capgo plugin to your packages
48+
49+
`npm i @capgo/capacitor-updater`
50+
51+
2. Modify your Capacitor project by adding the following in your **capacitor.config.json**
3852

3953
{{< highlight json "style=paraiso-dark">}}
4054
"plugins": {
4155
"CapacitorUpdater": {
42-
"autoUpdate": true
56+
"autoUpdate": true,
57+
"version": "1.0.0" // Bump this number each time you release a native version in the app store
4358
}
4459
}
4560
{{< /highlight >}}
@@ -56,30 +71,25 @@ CapacitorUpdater.notifyAppReady()
5671
### Configure `codemagic.yaml`
5772

5873
Add the following scripts to your `codemagic.yaml` file to:
59-
- install the **capacitor-updater**
60-
- update dependencies and copy assets to native project
6174
- upload your project to Capgo
6275

76+
Ensure you first install your dependencies and build your JS:
77+
6378
{{< highlight yaml "style=paraiso-dark">}}
6479
scripts:
65-
- name: Install npm dependencies for Ionic project
66-
script: |
67-
npm install @capgo/capacitor-updater
68-
npx @capgo/cli login $CAPGO_TOKEN
6980
- name: Update dependencies and copy web assets to native project
7081
script: |
7182
npx cap sync
7283
- name: Upload to Capgo
7384
script: |
74-
npx @capgo/cli add
75-
npx @capgo/cli upload
85+
npx @capgo/cli bundle upload --a $CAPGO_TOKEN
7686
{{< /highlight >}}
7787

7888

7989
When uploading app versions to **Capgo**, executing the following command will submit updates to all users (if production channel is set to public):
8090

8191
{{< highlight yaml "style=paraiso-dark">}}
82-
npx @capgo/cli@latest upload -c production
92+
npx @capgo/cli@latest bundle upload -c production
8393
{{< /highlight >}}
8494

8595
As soon as users start installing app versions on their devices, a device list will be visible in the Capgo UI. You can choose any one of them in order to let specific groups of users know about updates shipped with version uploads.

0 commit comments

Comments
 (0)