Skip to content

Commit 3549fdc

Browse files
authored
Codemagic CodePush CLI tools (#3143)
* Codemagic CodePush CLI tools * Removing Microsoft CodePush CLI instances * Adding Codemagic CodePush CLI tools * Update codepush-integration.md * Update codepush-integration.md * Update codepush-integration.md
1 parent 11cc13d commit 3549fdc

1 file changed

Lines changed: 23 additions & 27 deletions

File tree

content/integrations/codepush-integration.md

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -56,78 +56,74 @@ For Android:
5656

5757
{{< highlight bash "style=paraiso-dark">}}
5858
scripts:
59-
- name: Install CodePush cli tools
60-
script: |
61-
git clone https://github.com/microsoft/code-push-server /tmp/code-push-server
62-
cd /tmp/code-push-server/cli
63-
npm install && npm run build && npm install -g
59+
- name: Install Codemagic CodePush CLI tools
60+
script: |
61+
npm install -g @codemagic/code-push-cli
6462
- name: CodePush authentication
6563
script: |
66-
code-push-standalone login "https://codepush.pro" --key $CODEPUSH_TOKEN
64+
code-push login "https://codepush.pro" --key $CODEPUSH_TOKEN
6765
- name: CodePush add app # this script can be skipped if you have existing apps
6866
script: |
69-
code-push-standalone app add YOUR_PREFERRED_APP_NAME
70-
code-push-standalone app ls
67+
code-push app add YOUR_PREFERRED_APP_NAME
68+
code-push app ls
7169
- name: Install npm dependencies
7270
script: |
7371
npm install
7472
- name: Codepush deployment
7573
script: |
76-
code-push-standalone release-react APP_NAME_CREATED_ABOVE ios -d Staging# -d refers to the deployment name e.g. Production, Staging
77-
code-push-standalone release-react APP_NAME_CREATED_ABOVE android -d Staging # -d refers to the deployment name e.g. Production, Staging
74+
code-push release-react APP_NAME_CREATED_ABOVE ios -d Staging# -d refers to the deployment name e.g. Production, Staging
75+
code-push release-react APP_NAME_CREATED_ABOVE android -d Staging # -d refers to the deployment name e.g. Production, Staging
7876
{{< /highlight >}}
7977

8078
{{<notebox>}}
8179
**Note**: **$CODEPUSH_TOKEN** for authentication will be provided by the Codemagic team and it needs to be added as an environment variable and then imported in **codemagic.yaml**. More info can be found [here](https://docs.codemagic.io/yaml-basic-configuration/configuring-environment-variables/)
8280
{{</notebox>}}
8381

8482
{{<notebox>}}
85-
**Note**: Running **code-push-standalone release-react** generates updates and releases them to the server to be served
83+
**Note**: Running **code-push release-react** generates updates and releases them to the server to be served
8684
{{</notebox>}}
8785

8886

8987
7. In order to reveal the Deployment keys, run **code-push-standalone deployment ls YOUR_APP_NAME -k**
9088
8. By default, you get two Deployment channels: Staging and Production. You can add new ones, rename or delete them by running the following commands:
9189

9290
{{< highlight bash "style=paraiso-dark">}}
93-
To Add: code-push-standalone deployment add <appName> <deploymentName>
94-
To Remove: code-push-standalone deployment rm <appName> <deploymentName>
95-
To Rename: code-push-standalone deployment rename <appName> <deploymentName> <newDeploymentName>
91+
To Add: code-push deployment add <appName> <deploymentName>
92+
To Remove: code-push deployment rm <appName> <deploymentName>
93+
To Rename: code-push deployment rename <appName> <deploymentName> <newDeploymentName>
9694
{{< /highlight >}}
9795

9896
9. Likewise, apps can be added, renamed and deleted:
9997

10098
{{< highlight bash "style=paraiso-dark">}}
101-
To Add: code-push-standalone app add <appName>
102-
To Rename: code-push-standalone app rename <appName> <newAppName>
103-
To Delete: code-push-standalone app rm <appName>
99+
To Add: code-push app add <appName>
100+
To Rename: code-push app rename <appName> <newAppName>
101+
To Delete: code-push app rm <appName>
104102
{{< /highlight >}}
105103

106-
10. If you need to patch releases e.g. you need to make a change in a previous release e.g. increase rollout percentage, a missed bug fix etc. you can achieve it by running **code-push-standalone patch <appName> <deploymentName>**
104+
10. If you need to patch a previous release, e.g. increase the rollout percentage, push a missed bug fix or similar, you can achieve it by running **code-push patch <appName> <deploymentName>**
107105

108-
11. You cannot delete a deployment release history but you can roll it back in case any release was shipped with a broken feature or anything, by running **code-push-standalone rollback <appName> <deploymentName>**
106+
11. You cannot delete a deployed release, but you can roll back a release by running **code-push rollback <appName> <deploymentName>**
109107

110108
12. After testing an update against a deployment channel, it is possible to promote it by running the following command:
111109

112110
{{< highlight bash "style=paraiso-dark">}}
113-
code-push-standalone promote <appName> <sourceDeploymentName> <destDeploymentName>
111+
code-push promote <appName> <sourceDeploymentName> <destDeploymentName>
114112
{{< /highlight >}}
115113

116114
## Managing apps and deployments with the CodePush CLI
117115

118-
You can manage your apps and deployments using the CodePush CLI which you can install on your local machine as follows:
116+
You can manage your apps and deployments using the Codemagic CodePush CLI which you can install on your local machine as follows:
119117

120118
{{< highlight bash "style=paraiso-dark">}}
121-
git clone https://github.com/microsoft/code-push-server /tmp/code-push-server
122-
cd /tmp/code-push-server/cli
123-
npm install && npm run build && npm install -g
119+
npm install -g @codemagic/code-push-cli
124120
{{< /highlight >}}
125121

126122
You can log into your account using the CodePush access key provided by Codemagic.
127123

128-
The CodePush CLI reference is available [here](https://github.com/microsoft/code-push-server/tree/main/cli).
124+
The CodePush CLI reference is available [here](https://github.com/codemagic-ci-cd/code-push-pro).
129125

130-
To view deployments, update metadata, and installation metrics you can use the `code-push-standalone deployment ls <app_name>` command as described in the CodePush CLI docs [here](https://github.com/microsoft/code-push-server/tree/main/cli#:~:text=If%20at%20any%20time%20you%27d%20like%20to%20view%20the%20list%20of%20deployments%20that%20a%20specific%20app%20includes%2C%20you%20can%20simply%20run%20the%20following%20command%3A)
126+
To view deployments, update metadata, and installation metrics you can use the `code-push deployment ls <app_name>` command as described in the CodePush CLI docs [here](https://github.com/codemagic-ci-cd/code-push-pro?tab=readme-ov-file#deployment-management)
131127

132128

133129
## Debugging notes
@@ -138,4 +134,4 @@ If your project **Info.plist** file key **CFBundleShortVersionString** does not
138134
[Error] The "CFBundleShortVersionString" key in the "ios/Codemagic_RN/Info.plist" file needs to specify a valid semver string, containing both a major and minor version (e.g. 1.3.2, 1.1).
139135
{{< /highlight >}}
140136

141-
The solution is to either change the value in **Info.plist** file to a semver string value which is not recommended, or the best option is to add **--targetBinaryVersion** to the build/release command: **code-push-standalone release-react iOS ios --targetBinaryVersion 1.0.0**
137+
The solution is to either change the value in **Info.plist** file to a semver string value which is not recommended, or the best option is to add **--targetBinaryVersion** to the build/release command: **code-push release-react iOS ios --targetBinaryVersion 1.0.0**

0 commit comments

Comments
 (0)